util: fix escaping more than one ?* in glob_to_regex

This commit is contained in:
moneromooo-monero 2020-10-20 16:46:53 +00:00
parent 3cbb44a2fd
commit cc034fe0c3
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -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;
}