aboutsummaryrefslogtreecommitdiff
path: root/expr.c
diff options
context:
space:
mode:
authorAndrew Chambers <andrewchambers@fastmail.com>2019-02-15 20:03:29 +1300
committerMichael Forney <mforney@mforney.org>2019-02-15 00:06:53 -0800
commit35998a93f9a59a34477890637fda75982d9a5e1c (patch)
tree436cb4d6ac0d5e89c8ebc38985676184b5b70072 /expr.c
parentca6384fcf7fea13e095c278fec7f3e20c943ad62 (diff)
Fix hex escape in char literals.
Diffstat (limited to 'expr.c')
-rw-r--r--expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/expr.c b/expr.c
index 75c0423..88cf764 100644
--- a/expr.c
+++ b/expr.c
@@ -148,7 +148,7 @@ unescape(char **p)
++s;
assert(isxdigit(*s));
c = 0;
- do c = c * 16 + (*s > '9' ? tolower(*s) - 'a' : *s - '0');
+ do c = c * 16 + (*s > '9' ? 10 + tolower(*s) - 'a' : *s - '0');
while (isxdigit(*++s));
break;
default: