[CLJ-924] Error reporting of invalid digit in unicode character literal Created: 05/Feb/12 Updated: 23/Mar/12 Resolved: 23/Mar/12
|Affects Version/s:||Release 1.2, Release 1.3|
|Fix Version/s:||Release 1.4|
I ran across the following code when reading unicode character literals in readUnicodeChar(String token, int offset, int length, int base)
Casting -1 to a char doesn't seem to produce anything useful. I'm guessing the appropriate code might look like
For comparison, the code in the other readUnicodeCharacter used when reading strings handles this correctly with:
|Comment by Cosmin Stejerean [ 05/Feb/12 1:09 AM ]|
Attached a patch with the minor code fix.
|Comment by Stuart Sierra [ 24/Feb/12 3:00 PM ]|
Screened. I can't demonstrate this code being called by the reader, but it seems to be correct.
|Comment by Andy Fingerhut [ 27/Feb/12 10:08 PM ]|
Sorry to disturb things after this has been screened, but clj-924-unicode-invalid-digit-patch2.txt has some added tests that cause the problem to occur, as well as one other similar one nearby in LispReader.java, which is also fixed, in addition to Cosmin's fix.