1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-17 15:00:54 +00:00

Don't tolerate complex strings in the wine registry

This commit is contained in:
Evil Eye 2025-12-13 21:38:14 +01:00
parent 9e703f0fbf
commit f620790e1c

View file

@ -49,11 +49,13 @@ namespace Files::Wine
}
it = mwpath.erase(it);
if (it == mwpath.end())
break;
return {}; // Invalid string
char& c = *it;
// Replace \ with /
if (c == '\\')
c = '/';
// In theory we should probably handle \r, \n, \0, etc.
else // And just give up on any non-\ value
return {};
++it;
}
// Change drive letter to lowercase, so we could use ~/.wine/dosdevices symlinks