Linux /proc/apm: handle hex and decimal (and octal!) values.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403675
This commit is contained in:
parent
090a6d4f81
commit
fc45904c3c
1 changed files with 1 additions and 1 deletions
|
@ -318,7 +318,7 @@ static SDL_bool
|
|||
int_string(char *str, int *val)
|
||||
{
|
||||
char *endptr = NULL;
|
||||
*val = (int) strtol(str + 2, &endptr, 16);
|
||||
*val = (int) strtol(str, &endptr, 0);
|
||||
return ((*str != '\0') && (*endptr == '\0'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue