X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1676a1941a6bf74fd549c81f76190f6a7546c289..f2fe4f677724f4eced0ce62d0fded6fe3dda6bf7:/src/common/uri.cpp diff --git a/src/common/uri.cpp b/src/common/uri.cpp index c251d92326..e1878f78c4 100644 --- a/src/common/uri.cpp +++ b/src/common/uri.cpp @@ -117,7 +117,8 @@ wxChar wxURI::TranslateEscape(const wxChar* s) { wxASSERT_MSG(IsHex(*s) && IsHex(*(s+1)), wxT("Invalid escape!")); - return (wxChar)( CharToHex(*s) * 0x10 ) | CharToHex(*++s); + //<<4 == 16 + return (wxChar)( CharToHex(*s) << 4 ) | CharToHex(*++s); } wxString wxURI::Unescape(const wxString& uri) @@ -131,6 +132,8 @@ wxString wxURI::Unescape(const wxString& uri) new_uri += wxURI::TranslateEscape( &(uri.c_str()[i+1]) ); i += 2; } + else + new_uri += uri[i]; } return new_uri; @@ -464,7 +467,8 @@ const wxChar* wxURI::ParseServer(const wxChar* uri) // IP-literal = "[" ( IPv6address / IPvFuture ) "]" if (*uri == wxT('[')) { - if (ParseIPv6address(++uri) && *uri == wxT(']')) + ++uri; //some compilers don't support *&ing a ++* + if (ParseIPv6address(uri) && *uri == wxT(']')) { ++uri; m_hostType = wxURI_IPV6ADDRESS; @@ -477,7 +481,8 @@ const wxChar* wxURI::ParseServer(const wxChar* uri) { uri = uricopy; - if (ParseIPvFuture(++uri) && *uri == wxT(']')) + ++uri; //some compilers don't support *&ing a ++* + if (ParseIPvFuture(uri) && *uri == wxT(']')) { ++uri; m_hostType = wxURI_IPVFUTURE;