base: support hexa-decimal values in ascii_to(long)

This aligns the behavior of ascii_to(long&) with the behavior of
unsigned integer types, e.g., when parsing XML nodes into signed long
variables.
This commit is contained in:
Christian Helmuth 2021-01-05 15:13:53 +01:00 committed by Norman Feske
parent 72801975cd
commit 8bed4c1d54

View File

@ -407,7 +407,7 @@ namespace Genode {
int j = 0;
unsigned long value = 0;
j = ascii_to_unsigned(s, value, 10);
j = ascii_to_unsigned(s, value, 0);
if (!j) return i;