Welcome! Log In Create A New Profile

Advanced

[njs] Fixed "PROP NEXT" instruction.

Dmitry Volyntsev
March 23, 2020 01:02PM
details: https://hg.nginx.org/njs/rev/a7ca9fc28b0b
branches:
changeset: 1362:a7ca9fc28b0b
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Mon Mar 23 19:52:02 2020 +0300
description:
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.

diffstat:

src/njs_vmcode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 603a21fabf8d -r a7ca9fc28b0b src/njs_vmcode.c
--- 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:
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;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed "PROP NEXT" instruction.

Dmitry Volyntsev 44 March 23, 2020 01:02PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 82
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready