Skip to content

Commit aff0b60

Browse files
authored
Fix out of bounds (#29)
1 parent 8cce3b8 commit aff0b60

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/org/hjson/HjsonParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ else if (current=='\'') {
263263
triple++;
264264
read();
265265
if (triple==3) {
266-
if (sb.charAt(sb.length()-1)=='\n') sb.deleteCharAt(sb.length()-1);
266+
if (sb.length() > 0 && sb.charAt(sb.length()-1)=='\n') sb.deleteCharAt(sb.length()-1);
267267

268268
return sb.toString();
269269
}

0 commit comments

Comments
 (0)