From f9b35855cf69a6b78c58a276873e64deafe0c16a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 13 Feb 2016 04:01:54 +0100 Subject: [PATCH] Fix amazingly broken wxURI::CharToHex() to only accept hex digits The valid range for hex digits is A..F, not A..Z. --- src/common/uri.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/uri.cpp b/src/common/uri.cpp index 60a2128679..ff01b850f5 100644 --- a/src/common/uri.cpp +++ b/src/common/uri.cpp @@ -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';