You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmessage=`Invalid array index "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": must be a non-negative integer within the I-JSON safe integer range (0 to 2^53 - 1)`;
109
+
constindex=Number(referenceToken);
110
+
constindexUint32=index>>>0;
111
+
112
+
if(strictArrays&&index!==indexUint32){
113
+
constmessage=`Invalid array index "${referenceToken}" at position ${referenceTokenPosition} in "${jsonPointer}": index must be an unsigned 32-bit integer`;
114
114
115
115
tracer?.step({
116
116
referenceToken,
@@ -129,8 +129,7 @@ const evaluate = (
129
129
});
130
130
}
131
131
132
-
constindex=Number(referenceToken);
133
-
if(index>=realm.sizeOf(current)&&strictArrays){
132
+
if(strictArrays&&index>=realm.sizeOf(current)){
134
133
constmessage=`Invalid array index "${index}" at position ${referenceTokenPosition} in "${jsonPointer}": out of bounds`;
0 commit comments