From 6128c79b18b433411ed96283f24be7d571ab81f2 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sat, 13 Jan 2024 16:50:05 -0800 Subject: [PATCH] Fixed issue with EOF --- src/uxncli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uxncli.c b/src/uxncli.c index ab7df5a..91613b5 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -51,7 +51,7 @@ main(int argc, char **argv) if(i == argc) return system_error("usage:", "uxncli [-v] file.rom [args..]"); if(argv[i][0] == '-' && argv[i][1] == 'v') - return system_error("Uxncli - Varvara Emulator(CLI)", "4 Jan 2024."); + return system_error("Uxncli - Varvara Emulator(CLI)", "13 Jan 2024."); if(!system_init(&u, (Uint8 *)calloc(0x10000 * RAM_PAGES, sizeof(Uint8)), argv[i++])) return system_error("Init", "Failed to initialize uxn."); /* eval */ @@ -59,7 +59,7 @@ main(int argc, char **argv) if(uxn_eval(&u, PAGE_PROGRAM)) { console_listen(&u, i, argc, argv); while(!u.dev[0x0f]) { - char c = fgetc(stdin); + int c = fgetc(stdin); if(c == EOF) { console_input(&u, 0x00, CONSOLE_END); break;