diff --git a/src/libui_sdl/Platform.cpp b/src/libui_sdl/Platform.cpp index 7eba035d..e1381092 100644 --- a/src/libui_sdl/Platform.cpp +++ b/src/libui_sdl/Platform.cpp @@ -123,7 +123,7 @@ FILE* OpenFile(const char* path, const char* mode, bool mustexist) if (mustexist) { ret = fopen(path, "rb"); - if (ret) ret = freopen(path, mode); + if (ret) ret = freopen(path, mode, ret); } else ret = fopen(path, mode);