diff --git a/windows/utils/filename.c b/windows/utils/filename.c index 5c1a0d12..68c4c1cf 100644 --- a/windows/utils/filename.c +++ b/windows/utils/filename.c @@ -87,6 +87,7 @@ char filename_char_sanitise(char c) FILE *f_open(const Filename *fn, const char *mode, bool isprivate) { wchar_t *wmode = dup_mb_to_wc(DEFAULT_CODEPAGE, mode); - return _wfopen(fn->wpath, wmode); + FILE *fp = _wfopen(fn->wpath, wmode); sfree(wmode); + return fp; }