From d06e1c0a365494f778ac62fe075bf60ee8fd8167 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sat, 1 Apr 2017 15:32:04 +0300 Subject: [PATCH] Large indexes processing has been fixed in Array.prototype.reduceRight(). --- njs/njs_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/njs/njs_array.c b/njs/njs_array.c index 4918fd81..64418cea 100644 --- a/njs/njs_array.c +++ b/njs/njs_array.c @@ -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; } -- 2.47.3