From c558138b3cb11f586643f95fbca4ce5c4e92a198 Mon Sep 17 00:00:00 2001 From: HAPPY Date: Fri, 16 Apr 2021 11:04:49 +0800 Subject: [PATCH] Fix out of bound exception --- .../main/java/net/minidev/json/parser/JSONParserByteArray.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java b/json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java index ddf8a56..446f952 100644 --- a/json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java +++ b/json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java @@ -76,7 +76,7 @@ protected void extractString(int beginIndex, int endIndex) { } protected int indexOf(char c, int pos) { - for (int i = pos; pos < len; i++) + for (int i = pos; i < len; i++) if (in[i] == (byte) c) return i; return -1;