summaryrefslogtreecommitdiffhomepage
path: root/ArchiveEx/Archive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ArchiveEx/Archive.cpp')
-rw-r--r--ArchiveEx/Archive.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/ArchiveEx/Archive.cpp b/ArchiveEx/Archive.cpp
index a418446..c6e4e97 100644
--- a/ArchiveEx/Archive.cpp
+++ b/ArchiveEx/Archive.cpp
@@ -1,5 +1,11 @@
#include "Archive.h"
+#ifdef _WIN32
+#include <string.h>
+#else
+#include <strings.h>
+#endif
+
#include <cstdint>
#include <cstdio>
#include <cstring>
@@ -125,7 +131,11 @@ Archive::Find(const char* filepath) const
auto path = std::make_unique<char[]>(std::strlen(filepath) + 1);
ConvertPathSeparator(filepath, path.get());
for (std::size_t i = 0; i < entries.size(); ++i) {
- if (0 == std::strcmp(entries[i].name, path.get()))
+#ifdef _WIN32
+ if (0 == _stricmp(entries[i].name, path.get()))
+#else
+ if (0 == strcasecmp(entries[i].name, path.get()))
+#endif
return i;
}
return -1;