changeset 1362:a7ca9fc28b0b

Fixed "PROP NEXT" instruction. 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.
author Dmitry Volyntsev <xeioex@nginx.com>
date Mon, 23 Mar 2020 19:52:02 +0300
parents 603a21fabf8d
children 94d6774e0c03
files src/njs_vmcode.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/njs_vmcode.c	Mon Mar 23 17:15:46 2020 +0300
+++ b/src/njs_vmcode.c	Mon Mar 23 19:52:02 2020 +0300
@@ -788,7 +788,7 @@
                 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;