Skip to content

Commit f37b95e

Browse files
committed
Fix CLI memory stats output
1 parent 840ce4e commit f37b95e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

qjs.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,13 @@ int main(int argc, char **argv)
371371
continue;
372372
}
373373
if (opt == 'd' || !strcmp(longopt, "dump")) {
374-
if (opt_arg) {
375-
dump_flags = strtol(opt_arg, NULL, 16);
376-
break;
377-
}
378374
dump_memory++;
379375
continue;
380376
}
377+
if (opt == 'D' || !strcmp(longopt, "dump-flags")) {
378+
dump_flags = opt_arg ? strtol(opt_arg, NULL, 16) : 0;
379+
break;
380+
}
381381
if (opt == 'T' || !strcmp(longopt, "trace")) {
382382
trace_memory++;
383383
continue;

0 commit comments

Comments
 (0)