From 7ff69378c869945d8392007ebb482a275a2e46d2 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 17 Jul 2023 20:25:28 -0700 Subject: [PATCH] uxncli: stop on EOF as there is nothing left to run (besides endless loop) --- src/uxncli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uxncli.c b/src/uxncli.c index 9d15501..fd0ce81 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -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);