Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix reporting of invalid character in unicode character/string literals

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
  • Loading branch information...
commit 23f9801bd3bf0a19fbd791ffc1b0be2afafd5170 1 parent aae7d77
@cosmin cosmin authored stuarthalloway committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/jvm/clojure/lang/LispReader.java
View
4 src/jvm/clojure/lang/LispReader.java
@@ -262,7 +262,7 @@ static private int readUnicodeChar(String token, int offset, int length, int bas
{
int d = Character.digit(token.charAt(i), base);
if(d == -1)
- throw new IllegalArgumentException("Invalid digit: " + (char) d);
+ throw new IllegalArgumentException("Invalid digit: " + token.charAt(i));
uc = uc * base + d;
}
return (char) uc;
@@ -271,7 +271,7 @@ static private int readUnicodeChar(String token, int offset, int length, int bas
static private int readUnicodeChar(PushbackReader r, int initch, int base, int length, boolean exact) {
int uc = Character.digit(initch, base);
if(uc == -1)
- throw new IllegalArgumentException("Invalid digit: " + initch);
+ throw new IllegalArgumentException("Invalid digit: " + (char) initch);
int i = 1;
for(; i < length; ++i)
{
Please sign in to comment.
Something went wrong with that request. Please try again.