talatabao / as3corelib

Automatically exported from code.google.com/p/as3corelib
0 stars 0 forks source link

JSONDecoder fails with token null reference when closing right brace is missing #141

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Take a valid JSON string and remove the last right brace }
2. Decode that string and you should get a null reference error, because 
token is null in JSONDecoder

What is the expected output? What do you see instead?
Expected: JSONParseError with a meaningful message.
Instead: Null reference error (or "Type coercion error")

What version of the product are you using? On what operating system?
rev 113

Please provide any additional information below.
The attached patch fixed the issue for me in my vendor branch.
Supplied for upstream fixing.

Original issue reported on code.google.com by stefan.simroth on 7 May 2010 at 3:36

Attachments: