From ecb7f2335af402242b447f95e5e2539ad9668011 Mon Sep 17 00:00:00 2001 From: louie Date: Wed, 23 Dec 2020 18:36:24 -0800 Subject: Fixed tiny scanf/getchar issue --- read_cfg.c | 4 ++-- read_cfg.o | Bin 20608 -> 20544 bytes tml | Bin 47080 -> 47040 bytes 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/read_cfg.c b/read_cfg.c index 019b3a4..8625e87 100644 --- a/read_cfg.c +++ b/read_cfg.c @@ -192,7 +192,7 @@ void mkconfig_wizard(char *path){ printf("\nNo configuration file found. Auto-generate one now at \"%s\"? [Y/n] ", path); fflush(stdout); - scanf("%c", &input); + scanf(" %c", &input); if(input == 'n'){ printf("Configuration will not be auto-generated\n"); @@ -275,7 +275,7 @@ void mkconfig_wizard(char *path){ fclose(fp); printf("done\nIt is highly recommended to further tweak the configuration file! [press any key to continue]"); fflush(stdout); - fflush(stdin); + getchar(); getchar(); return; diff --git a/read_cfg.o b/read_cfg.o index 3102795..95b5bbb 100644 Binary files a/read_cfg.o and b/read_cfg.o differ diff --git a/tml b/tml index 9d9584a..da376e3 100755 Binary files a/tml and b/tml differ -- cgit