Author: oxygene Date: Thu Mar 17 13:20:04 2011 New Revision: 6450 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6450
Log: 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
Modified: trunk/payloads/libpayload/libc/string.c
Modified: trunk/payloads/libpayload/libc/string.c ============================================================================== --- trunk/payloads/libpayload/libc/string.c Thu Mar 17 08:47:49 2011 (r6449) +++ trunk/payloads/libpayload/libc/string.c Thu Mar 17 13:20:04 2011 (r6450) @@ -407,7 +407,7 @@ if (ch >= '0' && ch <= '9') return ch - '0'; else - return tolower(ch) - 'a'; + return 10 + tolower(ch) - 'a'; }
/**