Closed Bug 517429 Opened 15 years ago Closed 15 years ago

JavaScript function parseInt doesn't work as expected

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

VERIFIED DUPLICATE of bug 43425

People

(Reporter: lukas, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

Function returns wrong value.

Reproducible: Always

Steps to Reproduce:
1.alert(parseInt('09'));
2.returns 0 instead of 9
3.for strings '01','02'... works as expected
Actual Results:  
script returns number 0 instead of 9

Expected Results:  
9 ;)

This bug was found also in FireFox 2.0
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Verifying. Note that even Internet Explorer has this behavior.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.