summaryrefslogtreecommitdiffstats
path: root/src/getchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/getchar.c')
-rw-r--r--src/getchar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/getchar.c b/src/getchar.c
index a8778e0c61..4f5ea46390 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -2037,7 +2037,7 @@ f_getchar(typval_T *argvars, typval_T *rettv)
if (argvars[0].v_type == VAR_UNKNOWN)
// getchar(): blocking wait.
n = plain_vgetc();
- else if (tv_get_number_chk(&argvars[0], &error) == 1)
+ else if (tv_get_bool_chk(&argvars[0], &error))
// getchar(1): only check if char avail
n = vpeekc_any();
else if (error || vpeekc_any() == NUL)