mirror of
https://github.com/pevans/erc-c.git
synced 2025-01-18 10:30:37 +00:00
Allow $XX hex notation
This commit is contained in:
parent
5bb76164dc
commit
fec8ef0743
@ -95,6 +95,12 @@ vm_debug_addr(const char *str)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We do accept the $XX notation for hexadecimals; it's easy to do,
|
||||||
|
// since we can just skip past that part of the string.
|
||||||
|
if (*str == '$') {
|
||||||
|
str++;
|
||||||
|
}
|
||||||
|
|
||||||
addr = strtol(str, NULL, 16);
|
addr = strtol(str, NULL, 16);
|
||||||
if (addr == 0 && errno == EINVAL) {
|
if (addr == 0 && errno == EINVAL) {
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user