mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-27 21:39:37 +00:00
+ fix small regression in the unescape_url() code
This commit is contained in:
@ -60,7 +60,7 @@ static char charFromHex(std::string a) {
|
||||
|
||||
void unescapeUrl(string &url) {
|
||||
std::string::size_type pos = 0;
|
||||
while ((pos = url.find('%', pos + 1)) != std::string::npos &&
|
||||
while ((pos = url.find('%', pos ? pos + 1 : pos)) != std::string::npos &&
|
||||
pos + 3 <= url.length()) {
|
||||
url.replace(pos, 3, 1, charFromHex(url.substr(pos + 1, 2)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user