From 8bed4c1d54ed1f70aabf581ce772ba507030d5b8 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 5 Jan 2021 15:13:53 +0100 Subject: [PATCH] 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. --- repos/base/include/util/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/base/include/util/string.h b/repos/base/include/util/string.h index fc8b775662..6d2aee5f37 100644 --- a/repos/base/include/util/string.h +++ b/repos/base/include/util/string.h @@ -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;