Closed Bug 545832 Opened 15 years ago Closed 6 years ago

Running toSource on parsed hexadecimal gives wrong result

Categories

(Rhino Graveyard :: Core, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: frankgroeneveld, Unassigned)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7 Build Identifier: Source from CVS trunk @ 20091113 Parsing this code: seed = (typeof fixedseed == "number") ? fixedseed : (Math.round(Math.random() * 0xffffffff)); and running to source on the ASt that is produced, will result in something like this: seed = (typeof fixedseed == "number") ? fixedseed : (Math.round(Math.random() * ffffffff)); Note that the 0x part of 0xffffffff is stripped off. Reproducible: Always
Happens with trunk also.
Fix this bug.
Patch for parsing hexadecimal numbers. Try running the following before and after the patch: new Parser().parse("var color = 0xAABBCC;", "", 1).toSource();

Closing. Bug management is now done here:
https://github.com/mozilla/rhino

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: