]> git.kaiwu.me - njs.git/commitdiff
A fast exit from argument normalization loop.
authorIgor Sysoev <igor@sysoev.ru>
Tue, 29 Mar 2016 10:38:18 +0000 (13:38 +0300)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 29 Mar 2016 10:38:18 +0000 (13:38 +0300)
This also fixes an issue when SunC 5.9 does not set
omitted array elements to a zero.

njs/njs_vm.c

index 92713737134c4d505ce3642d7c2b4b65953ec6d4..df32542b3f92381219d699567fb846e347a9e685 100644 (file)
@@ -2474,8 +2474,10 @@ njs_normalize_args(njs_vm_t *vm, njs_value_t *args, uint8_t *args_types,
             break;
 
         case NJS_SKIP_ARG:
-
             break;
+
+        case 0:
+            return NJS_OK;
         }
 
         args++;