Fix a critical bug which will cause URLDecode to stop working

This commit is contained in:
Tindy X committed 2019-11-09 00:23:59 +08:00
1 parent 87e6ea0657
commit 903df96899
1 file changed
+1 -1
+1 -1
View File
@@ -128,7 +128,7 @@ std::string UrlDecode(const std::string& str)
strTemp += ' ';
else if (str[i] == '%')
{
if(i + 2 < length)
if(i + 2 >= length)
return strTemp;
unsigned char high = FromHex((unsigned char)str[++i]);
unsigned char low = FromHex((unsigned char)str[++i]);