From 86326e832974d984846ae078e568c023a5f76f1f Mon Sep 17 00:00:00 2001 From: Sour Date: Tue, 30 Jun 2020 16:00:22 -0400 Subject: [PATCH] ZIP: Fixed recent game not loading when filename stored in zip file was not UTF-8 --- Core/VirtualFile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/VirtualFile.cpp b/Core/VirtualFile.cpp index bc0d71f5..8c1daa41 100644 --- a/Core/VirtualFile.cpp +++ b/Core/VirtualFile.cpp @@ -57,7 +57,11 @@ VirtualFile::operator std::string() const } else if(_path.empty()) { throw std::runtime_error("Cannot convert to string"); } else { - return _path + "\x1" + _innerFile; + if(_innerFileIndex >= 0) { + return _path + "\x1" + _innerFile + "\x1" + std::to_string(_innerFileIndex); + } else { + return _path + "\x1" + _innerFile; + } } }