Fixed crash on linux

This commit is contained in:
KiritoDv
2023-08-25 01:06:43 -06:00
parent def5b5e29b
commit f5cbd0056d
2 changed files with 4 additions and 5 deletions
+4 -4
View File
@@ -16,10 +16,6 @@ SWrapper::SWrapper(const std::string& path) {
}
}
SWrapper::~SWrapper() {
SFileCloseArchive(this->hMpq);
}
bool SWrapper::CreateFile(std::string path, std::vector<char> data) {
HANDLE hFile;
#ifdef _WIN32
@@ -63,5 +59,9 @@ bool SWrapper::CreateFile(std::string path, std::vector<char> data) {
}
void SWrapper::Close() {
if(this->hMpq == nullptr) {
std::cout << "Archive already closed" << std::endl;
return;
}
SFileCloseArchive(this->hMpq);
}
-1
View File
@@ -7,7 +7,6 @@
class SWrapper {
public:
SWrapper(const std::string& path);
~SWrapper();
std::vector<char> ReadFile(std::string path);
bool CreateFile(std::string path, std::vector<char> data);