aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-01-04 16:57:26 -0500
committerB. Watson <urchlay@slackware.uk>2024-01-04 16:57:26 -0500
commitb7c8d77734be2d0fd0da31f5a1645bf2eabd4583 (patch)
tree82b48403791bede516755707454d60f8a05de30c
parent4f3447eba56896aaba1962be3aa2a1ce4081bf0a (diff)
downloadhcalc-b7c8d77734be2d0fd0da31f5a1645bf2eabd4583.tar.gz
Revert aafee27 and fix it correctly.
-rw-r--r--input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/input.c b/input.c
index 82c1cd1..575750b 100644
--- a/input.c
+++ b/input.c
@@ -265,7 +265,7 @@ key(char c)
case 'd':
case 'e':
case 'f':
- v = c - 38;
+ v = c - 39;
case '0':
case '1':
case '2':
@@ -277,7 +277,7 @@ key(char c)
case '8':
case '9':
v -= '0';
- if (v > base || iptr == MAXIN-1)
+ if (v >= base || iptr == MAXIN-1)
bell();
else
{