]> git.kaiwu.me - njs.git/commitdiff
Large indexes processing has been fixed in
authorIgor Sysoev <igor@sysoev.ru>
Sat, 1 Apr 2017 12:32:04 +0000 (15:32 +0300)
committerIgor Sysoev <igor@sysoev.ru>
Sat, 1 Apr 2017 12:32:04 +0000 (15:32 +0300)
Array.prototype.reduceRight().

njs/njs_array.c

index 4918fd817ab98ab548f51aa33b87c9e2696decd4..64418cea48758787143cacb9f8b35762e766534c 100644 (file)
@@ -1716,7 +1716,7 @@ njs_array_prototype_reduce_right_continuation(njs_vm_t *vm, njs_value_t *args,
 
     iter = njs_vm_continuation(vm);
 
-    if ((int32_t) iter->next_index < 0) {
+    if (iter->next_index == NJS_ARRAY_INVALID_INDEX) {
         vm->retval = iter->retval;
         return NXT_OK;
     }