From 3eb5e4e9a363b090e957bbf4e3b1d170f3c71022 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 17 Mar 2011 12:20:04 +0000 Subject: libpayload: fix string-to-numeric functions for base > 10 Signed-off-by: Patrick Georgi Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6450 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- payloads/libpayload/libc/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads') diff --git a/payloads/libpayload/libc/string.c b/payloads/libpayload/libc/string.c index ce5767e4b0..cc587c82a2 100644 --- a/payloads/libpayload/libc/string.c +++ b/payloads/libpayload/libc/string.c @@ -407,7 +407,7 @@ static int _offset(char ch, int base) if (ch >= '0' && ch <= '9') return ch - '0'; else - return tolower(ch) - 'a'; + return 10 + tolower(ch) - 'a'; } /** -- cgit v1.2.3