diff --git a/lib/mfile.cpp b/lib/mfile.cpp index d6fed85187..e459ec21c5 100644 --- a/lib/mfile.cpp +++ b/lib/mfile.cpp @@ -57,8 +57,12 @@ int MFILE::open(const char* path, const char* mode) { // seems like Win's realloc is stupid, Make it smart. // static inline char* realloc_aux(char* p, int len) { +#ifdef _WIN32 if (_msize(p) >= len) return p; return (char*) realloc(p, len*2); +#else + return (char*) realloc(p, len); +#endif } #define BUFSIZE 100000