lib: Allow using 0x when a decimal value is requested

U-Boot mostly uses hex for value input, largely because addresses are much
easier to understand in hex.

But in some cases a decimal value is requested, such as where the value is
small or hex does not make sense in the context. In these cases it is
sometimes useful to be able to provide a hex value in any case, if only to
resolve any ambiguity.

Add this functionality, for increased flexibility.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/str_ut.c b/test/str_ut.c
index 0d1bf39..d2840d5 100644
--- a/test/str_ut.c
+++ b/test/str_ut.c
@@ -89,7 +89,7 @@
 		ut_assertok(run_strtoul(uts, str2, 10, 1099, 4, upper));
 		ut_assertok(run_strtoul(uts, str2, 16, 0x1099ab, 6, upper));
 		ut_assertok(run_strtoul(uts, str3, 16, 0xb, 3, upper));
-		ut_assertok(run_strtoul(uts, str3, 10, 0, 1, upper));
+		ut_assertok(run_strtoul(uts, str3, 10, 0xb, 3, upper));
 
 		/* Octal */
 		ut_assertok(run_strtoul(uts, str6, 0, 63, 3, upper));
@@ -144,7 +144,7 @@
 		ut_assertok(run_strtoull(uts, str2, 10, 1099, 4, upper));
 		ut_assertok(run_strtoull(uts, str2, 16, 0x1099ab, 6, upper));
 		ut_assertok(run_strtoull(uts, str3, 16, 0xb, 3, upper));
-		ut_assertok(run_strtoull(uts, str3, 10, 0, 1, upper));
+		ut_assertok(run_strtoull(uts, str3, 10, 0xb, 3, upper));
 
 		/* Octal */
 		ut_assertok(run_strtoull(uts, str6, 0, 63, 3, upper));