Closed Bug 531436 Opened 16 years ago Closed 16 years ago

parseFloat fails on number followed by "e" that is not exponent

Categories

(Rhino Graveyard :: Core, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mguillemot, Assigned: norrisboyd)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.0.15) Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15 Build Identifier: parseFloat incorrectly returns NaN for strings like: - 789e - 789efgh - 789e+ - 789e- - 789e+hello The "e" is recognized as the beginning of an exponent but if what follows is not a valid exponent, it should be ignored. See ECMA spec 15.1.2.3. Reproducible: Always
Assignee: nobody → norrisboyd
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Thanks! Checking in src/org/mozilla/javascript/NativeGlobal.java; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/NativeGlobal.java,v <-- NativeGlobal.java new revision: 1.89; previous revision: 1.88 done Checking in testsrc/org/mozilla/javascript/tests/GlobalParseXTest.java; /cvsroot/mozilla/js/rhino/testsrc/org/mozilla/javascript/tests/GlobalParseXTest.java,v <-- GlobalParseXTest.java new revision: 1.2; previous revision: 1.1 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: