We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51930f8 commit ea1bb16Copy full SHA for ea1bb16
shared/main.cc
@@ -13,7 +13,7 @@ int main(int argc, char **argv){
13
/* parse and set any options present */
14
for (int i = 1; i < argc; i++){
15
char *pos = argv[i];
16
- if (*pos == '-') {
+ if (*pos == '-' && *(pos + 1) != '-') {
17
pos++;
18
int len = strlen(pos);
19
for (int j = 0; j < len; j++) {
@@ -44,7 +44,7 @@ int main(int argc, char **argv){
44
)) return 1;
45
46
/* load ROM from the last non-option argument */
47
- if (argc > 1 && argv[argc-1][0] != '-') {
+ if (argc > 1 && argv[argc-1][0] != '-' && argv[argc-1] != profiles_path) {
48
if (chip8_load_rom(argv[argc-1])) return 1;
49
}
50
0 commit comments