]> git.kaiwu.me - njs.git/commitdiff
Fixed "PROP NEXT" instruction.
authorDmitry Volyntsev <xeioex@nginx.com>
Mon, 23 Mar 2020 16:52:02 +0000 (19:52 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Mon, 23 Mar 2020 16:52:02 +0000 (19:52 +0300)
The proper way to access array's elements is "start" field whereas
"data" is an allocation field.  While currently they are numerically
indentical it may change in the future.

src/njs_vmcode.c

index a42cd7582f84960369d46e765a85c9a6152a73d0..6b74c4aabef8076a37e59c43584e967b0167f838 100644 (file)
@@ -788,7 +788,7 @@ next:
                 next = value2->data.u.next;
 
                 if (next->index < next->array->length) {
-                    *retval = next->array->data[next->index++];
+                    *retval = next->array->start[next->index++];
 
                     ret = pnext->offset;
                     break;