Fix CLI memory stats output

This commit is contained in:
Saúl Ibarra Corretgé 2024-04-22 09:30:10 +02:00
parent 840ce4e719
commit 2050bc782a

8
qjs.c
View file

@ -371,13 +371,13 @@ int main(int argc, char **argv)
continue; continue;
} }
if (opt == 'd' || !strcmp(longopt, "dump")) { if (opt == 'd' || !strcmp(longopt, "dump")) {
if (opt_arg) {
dump_flags = strtol(opt_arg, NULL, 16);
break;
}
dump_memory++; dump_memory++;
continue; continue;
} }
if (opt == 'D' || !strcmp(longopt, "dump-flags")) {
dump_flags = opt_arg ? strtol(opt_arg, NULL, 16) : 0;
break;
}
if (opt == 'T' || !strcmp(longopt, "trace")) { if (opt == 'T' || !strcmp(longopt, "trace")) {
trace_memory++; trace_memory++;
continue; continue;