uxncli: stop on EOF as there is nothing left to run (besides endless loop)

This commit is contained in:
Devine Lu Linvega 2023-07-17 20:25:28 -07:00
parent dd107933fe
commit 7ff69378c8
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ main(int argc, char **argv)
}
while(!u.dev[0x0f]) {
int c = fgetc(stdin);
if(c != EOF) console_input(&u, (Uint8)c, CONSOLE_STD);
if(c == EOF) break;
console_input(&u, (Uint8)c, CONSOLE_STD);
}
}
free(u.ram);