[njs] Fixed SyntaxError message for unterminated regexp token.

Dmitry Volyntsev xeioex at nginx.com
Wed Jan 30 15:56:39 UTC 2019


details:   https://hg.nginx.org/njs/rev/d99f8ee4255c
branches:  
changeset: 745:d99f8ee4255c
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Wed Jan 30 18:49:16 2019 +0300
description:
Fixed SyntaxError message for unterminated regexp token.

diffstat:

 njs/njs_regexp.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r e136756f6bb2 -r d99f8ee4255c njs/njs_regexp.c
--- a/njs/njs_regexp.c	Wed Jan 30 18:48:23 2019 +0300
+++ b/njs/njs_regexp.c	Wed Jan 30 18:49:16 2019 +0300
@@ -184,7 +184,7 @@ njs_regexp_literal(njs_vm_t *vm, njs_par
     }
 
     njs_parser_syntax_error(vm, parser, "Unterminated RegExp \"%.*s\"",
-                            p - lexer->start - 1, lexer->start - 1);
+                            p - (lexer->start - 1), lexer->start - 1);
 
     return NJS_TOKEN_ILLEGAL;
 }


More information about the nginx-devel mailing list