Message ID | 45609d61afc647de3afafc4203d904676837ffe3.1645556015.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 24d7ce383a3d92feae6a641499448fde43206fd8 |
Headers | show |
Series | a couple of read_key_without_echo() fixes | expand |
diff --git a/compat/terminal.c b/compat/terminal.c index 5b903e7c7e3..fb8c70a6251 100644 --- a/compat/terminal.c +++ b/compat/terminal.c @@ -385,7 +385,7 @@ int read_key_without_echo(struct strbuf *buf) ch = getchar(); if (ch == EOF) - return 0; + break; strbuf_addch(buf, ch); } }