]> git.kaiwu.me - njs.git/commitdiff
Fixed processing files from stdin.
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 15 Aug 2017 18:19:13 +0000 (21:19 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Tue, 15 Aug 2017 18:19:13 +0000 (21:19 +0300)
njs/njs.c

index 4ff329fb7d73566876499da7e4ae4cf427845a0b..719d027e2fc2b5aad1eb100819d1b64e18f8641d 100644 (file)
--- a/njs/njs.c
+++ b/njs/njs.c
@@ -263,8 +263,8 @@ njs_process_file(njs_opts_t *opts, njs_vm_opt_t *vm_options)
                 return NXT_ERROR;
             }
 
-            p = script.start;
-            end = p + size;
+            p = script.start + script.length;
+            end = script.start + size;
         }
 
         memcpy(p, buf, n);