projects
/
coreboot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
libpayload: fix string-to-numeric functions for base > 10
[coreboot.git]
/
payloads
/
libpayload
/
libc
/
string.c
diff --git
a/payloads/libpayload/libc/string.c
b/payloads/libpayload/libc/string.c
index ce5767e4b08600e97b8629639b96750cf7c05203..cc587c82a2989411a023d1a4faffe920795b1418 100644
(file)
--- 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';
}
/**