From 35ff0a8910cc072d6a020819b33fa840800c2815 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 29 Nov 2020 16:50:31 -0500 Subject: util: Use fgetc(stdin) instead of getchar() On FreeBSD the getchar() macro leads to (spurious?) msan uninitialized value errors. Call the fgetc() library function to work around it. --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 51336ff..3ba8053 100644 --- a/util.c +++ b/util.c @@ -262,7 +262,7 @@ static char *xgetline(void) { } while (true) { - int c = getchar(); + int c = fgetc(stdin); if (c == '\n' || c == EOF) { break; } -- cgit v1.2.3