1
0
Fork 0
mirror of https://github.com/pnx/m16vm synced 2026-06-16 03:44:55 +02:00

vm/vm.c: better check-code for options (we should accept double dash "--" instead of single)

This commit is contained in:
Henrik Hautakoski 2019-04-01 19:32:29 +02:00
parent c9f0d8b616
commit c28be46ee3
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -64,10 +64,10 @@ int main(int argc, char **argv) {
// Parse options.
for(i = 1; i < argc; i++) {
if (argv[i][0] == '-') {
if (!strcmp(argv[i], "-dmem")) {
if (argv[i][0] == '-' && argv[i][1] == '-') {
if (!strcmp(argv[i] + 2, "dmem")) {
debug_mem = 1;
} else if (!strcmp(argv[i], "-dreg")) {
} else if (!strcmp(argv[i] + 2, "dreg")) {
debug_reg = 1;
} else {
fprintf(stderr, "Invalid option '%s'\n", argv[i]);