Browse code

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

Sigrid Solveig Haflínudóttir authored on 16/07/2023 22:52:52
Showing 1 changed files
... ...
@@ -61,7 +61,8 @@ main(int argc, char **argv)
61 61
 		}
62 62
 		while(!u.dev[0x0f]) {
63 63
 			int c = fgetc(stdin);
64
-			if(c != EOF) console_input(&u, (Uint8)c, CONSOLE_STD);
64
+			if(c == EOF) break;
65
+			console_input(&u, (Uint8)c, CONSOLE_STD);
65 66
 		}
66 67
 	}
67 68
 	free(u.ram);