aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/melon_fopen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/melon_fopen.h b/src/melon_fopen.h
index 603e15f..8e79e8b 100644
--- a/src/melon_fopen.h
+++ b/src/melon_fopen.h
@@ -29,7 +29,7 @@ static FILE* melon_fopen(const char* path, const char* mode)
if (len < 1) return NULL;
WCHAR* fatass = new WCHAR[len];
int res = MultiByteToWideChar(CP_UTF8, 0, path, -1, fatass, len);
- if (res != len) return NULL; // checkme?
+ if (res != len) { delete[] fatass; return NULL; } // checkme?
// this will be more than enough
WCHAR fatmode[4];