Fix amazingly broken wxURI::CharToHex() to only accept hex digits

The valid range for hex digits is A..F, not A..Z.
This commit is contained in:
Vadim Zeitlin 2016-02-13 04:01:54 +01:00
parent 5245afa263
commit f9b35855cf

View File

@ -90,9 +90,9 @@ void wxURI::Clear()
/* static */
int wxURI::CharToHex(char c)
{
if ((c >= 'A') && (c <= 'Z'))
if ((c >= 'A') && (c <= 'F'))
return c - 'A' + 10;
if ((c >= 'a') && (c <= 'z'))
if ((c >= 'a') && (c <= 'f'))
return c - 'a' + 10;
if ((c >= '0') && (c <= '9'))
return c - '0';