util: fix escaping more than one ?* in glob_to_regex

pull/351/head
moneromooo-monero 4 years ago committed by wowario
parent b353da51f9
commit 1cc36a652b
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

@ -1000,13 +1000,13 @@ std::string get_nix_version_display_string()
for (char c: val)
{
if (c == '*')
newval += escape ? "*" : ".*";
newval += escape ? "*" : ".*", escape = false;
else if (c == '?')
newval += escape ? "?" : ".";
newval += escape ? "?" : ".", escape = false;
else if (c == '\\')
newval += '\\', escape = !escape;
else
newval += c;
newval += c, escape = false;
}
return newval;
}

Loading…
Cancel
Save