From 903df968991701d411c5de6a138f098da7ea8054 Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Sat, 9 Nov 2019 00:23:59 +0800 Subject: [PATCH] Fix a critical bug which will cause URLDecode to stop working --- misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc.cpp b/misc.cpp index bdd2a04..a744612 100644 --- a/misc.cpp +++ b/misc.cpp @@ -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]);