commit 7ff6937
Devine Lu Linvega
·
2023-07-18 03:25:28 +0000 UTC
parent dd10793
uxncli: stop on EOF as there is nothing left to run (besides endless loop)
1 files changed,
+2,
-1
+2,
-1
1@@ -61,7 +61,8 @@ main(int argc, char **argv)
2 }
3 while(!u.dev[0x0f]) {
4 int c = fgetc(stdin);
5- if(c != EOF) console_input(&u, (Uint8)c, CONSOLE_STD);
6+ if(c == EOF) break;
7+ console_input(&u, (Uint8)c, CONSOLE_STD);
8 }
9 }
10 free(u.ram);