summaryrefslogtreecommitdiffstats
path: root/lib/readkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readkey.c')
-rw-r--r--lib/readkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/readkey.c b/lib/readkey.c
index fd72951046..c26e9d51ab 100644
--- a/lib/readkey.c
+++ b/lib/readkey.c
@@ -61,7 +61,7 @@ int read_key(void)
esc[i] = getchar();
if (esc[i++] == '~')
break;
- if (i == ARRAY_SIZE(esc))
+ if (i == ARRAY_SIZE(esc) - 1)
return -1;
}
}