From 2ff6badecd7c0b8229a1f079cfadba0292e321b3 Mon Sep 17 00:00:00 2001 From: sys64738 Date: Mon, 9 May 2022 01:43:07 +0200 Subject: [PATCH] allow for '0X' hex prefix, too --- util/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/expr.c b/util/expr.c index 7614d83..54ad9de 100644 --- a/util/expr.c +++ b/util/expr.c @@ -54,7 +54,7 @@ static int addr_exp_data(struct addr_exp_state *s, const char *text) } /* Hex value */ - if (*text == '0' && text[1] == 'x') { + if (*text == '0' && (text[1] == 'x' || text[1] == 'X')) { value = strtoul(text + 2, NULL, 16); } else if (*text == '0' && text[1] == 'd') { value = atoi(text + 2);