mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
Fixed crash on linux
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user