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
This commit is contained in:
Patrick Georgi 2011-03-17 12:20:04 +00:00 committed by Patrick Georgi
parent b8e9ba9a7a
commit 3eb5e4e9a3
1 changed files with 1 additions and 1 deletions

View File

@ -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';
}
/**