summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2011-03-17 12:20:04 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2011-03-17 12:20:04 +0000
commit3eb5e4e9a363b090e957bbf4e3b1d170f3c71022 (patch)
treee30159831f1eb3817d8738385f244cc35309c336
parentb8e9ba9a7af6e5563de9f284d70812e3fb3e75b8 (diff)
downloadcoreboot-3eb5e4e9a363b090e957bbf4e3b1d170f3c71022.tar.xz
libpayload: fix string-to-numeric functions for base > 10
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Acked-by: Patrick Georgi <patrick.georgi@secunet.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6450 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--payloads/libpayload/libc/string.c2
1 files changed, 1 insertions, 1 deletions
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';
}
/**