We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c37e1b7 commit 14d6df8Copy full SHA for 14d6df8
src/node.cc
@@ -2867,7 +2867,9 @@ static void ParseArgs(int* argc,
2867
fprintf(stderr, "%s: %s requires an argument\n", argv[0], arg);
2868
exit(9);
2869
}
2870
- } else if (argv[index + 1] != NULL && argv[index + 1][0] != '-') {
+ } else if ((index + 1 < nargs) &&
2871
+ argv[index + 1] != NULL &&
2872
+ argv[index + 1][0] != '-') {
2873
args_consumed += 1;
2874
eval_string = argv[index + 1];
2875
if (strncmp(eval_string, "\\-", 2) == 0) {
0 commit comments