Commit fc45904c authored by Ryan C. Gordon's avatar Ryan C. Gordon

Linux /proc/apm: handle hex and decimal (and octal!) values.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403675
parent 090a6d4f
...@@ -318,7 +318,7 @@ static SDL_bool ...@@ -318,7 +318,7 @@ static SDL_bool
int_string(char *str, int *val) int_string(char *str, int *val)
{ {
char *endptr = NULL; char *endptr = NULL;
*val = (int) strtol(str + 2, &endptr, 16); *val = (int) strtol(str, &endptr, 0);
return ((*str != '\0') && (*endptr == '\0')); return ((*str != '\0') && (*endptr == '\0'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment