Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Linux /proc/apm: handle hex and decimal (and octal!) values.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 30, 2009
1 parent 3eceea4 commit 2bedbdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/power/linux/SDL_syspower.c
Expand Up @@ -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'));
}

Expand Down

0 comments on commit 2bedbdf

Please sign in to comment.