diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 7f855268522..2f91eee90ed 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -74,7 +74,7 @@ Error FileAccessUnix::_open(const String& p_path, int p_mode_flags) { else if (p_mode_flags==WRITE) mode_string="wb"; else if (p_mode_flags==READ_WRITE) - mode_string="wb+"; + mode_string="rb+"; else return ERR_INVALID_PARAMETER; diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index a6073cbb297..50e2b1d9e6f 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -65,7 +65,7 @@ Error FileAccessWindows::_open(const String& p_filename, int p_mode_flags) { else if (p_mode_flags==WRITE) mode_string=L"wb"; else if (p_mode_flags==READ_WRITE) - mode_string=L"wb+"; + mode_string=L"rb+"; else return ERR_INVALID_PARAMETER;