From ec15d215c1bd450cd47e8e449ddf073a82e2cc5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Sj=C3=B8rup?= Date: Mon, 6 Mar 2023 09:59:31 +0100 Subject: [PATCH] Javascript: parseFloat does not take a base parameter --- impls/js/reader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impls/js/reader.js b/impls/js/reader.js index a653ff142b..b2ec3acc37 100644 --- a/impls/js/reader.js +++ b/impls/js/reader.js @@ -30,7 +30,7 @@ function read_atom (reader) { if (token.match(/^-?[0-9]+$/)) { return parseInt(token,10) // integer } else if (token.match(/^-?[0-9][0-9.]*$/)) { - return parseFloat(token,10); // float + return parseFloat(token); // float } else if (token.match(/^"(?:\\.|[^\\"])*"$/)) { return token.slice(1,token.length-1) .replace(/\\(.)/g, function (_, c) { return c === "n" ? "\n" : c})