diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-11-29 16:50:31 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-11-30 16:13:51 -0500 |
commit | 35ff0a8910cc072d6a020819b33fa840800c2815 (patch) | |
tree | 3bf2a7fb120c5f37e60e0d87f7f0ff5ef86aa2a4 /util.c | |
parent | 85c6aebb5724e292c59ebc77320db55672f49070 (diff) | |
download | bfs-35ff0a8910cc072d6a020819b33fa840800c2815.tar.xz |
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.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -262,7 +262,7 @@ static char *xgetline(void) { } while (true) { - int c = getchar(); + int c = fgetc(stdin); if (c == '\n' || c == EOF) { break; } |