1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-28 23:48:30 +02:00

Fix VVV_isxdigit() accepting A-Za-z instead of A-Fa-f

This function accepted more characters than it should have. (I made the
same mistake on my PR to SDL, embarassingly enough...)
This commit is contained in:
Misa 2021-02-15 20:43:58 -08:00 committed by Ethan Lee
parent 3225be6d9e
commit b243b116c9

View File

@ -290,8 +290,8 @@ bool is_number(const char* str)
static bool VVV_isxdigit(const unsigned char digit) static bool VVV_isxdigit(const unsigned char digit)
{ {
return (digit >= 'a' && digit <= 'z') return (digit >= 'a' && digit <= 'f')
|| (digit >= 'A' && digit <= 'Z') || (digit >= 'A' && digit <= 'F')
|| SDL_isdigit(digit); || SDL_isdigit(digit);
} }