expr: allow '0X' hex prefix

This commit is contained in:
Triss 2022-05-19 01:14:53 +02:00
parent 9269d22d2b
commit 63e2077d5b
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ static int addr_exp_data(struct addr_exp_state *s, const char *text)
} }
/* Hex value */ /* Hex value */
if (*text == '0' && text[1] == 'x') { if (*text == '0' && (text[1] == 'x' || text[1] == 'X')) {
value = strtoul(text + 2, NULL, 16); value = strtoul(text + 2, NULL, 16);
} else if (*text == '0' && text[1] == 'd') { } else if (*text == '0' && text[1] == 'd') {
value = atoi(text + 2); value = atoi(text + 2);