ZIP: Fixed recent game not loading when filename stored in zip file was not UTF-8

This commit is contained in:
Sour 2020-06-30 16:50:29 -04:00
parent 6f768eae91
commit cece3a3a14

View file

@ -56,9 +56,13 @@ VirtualFile::operator std::string() const
return _path;
} else if(_path.empty()) {
throw std::runtime_error("Cannot convert to string");
} else {
if(_innerFileIndex >= 0) {
return _path + "\x1" + _innerFile + "\x1" + std::to_string(_innerFileIndex);
} else {
return _path + "\x1" + _innerFile;
}
}
}
void VirtualFile::FromStream(std::istream& input, vector<uint8_t>& output)