Skip to content

Commit 12bbe8c

Browse files
authored
Merge pull request stleary#452 from johnjaylward/FixEOF
Adds check for EOF
2 parents 09dddb8 + 19e9bb6 commit 12bbe8c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

JSONTokener.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ public Object nextValue() throws JSONException {
448448
sb.append(c);
449449
c = this.next();
450450
}
451-
this.back();
451+
if (!this.eof) {
452+
this.back();
453+
}
452454

453455
string = sb.toString().trim();
454456
if ("".equals(string)) {

0 commit comments

Comments
 (0)