From 5769f8aaaed70fa28b92562255dd61c1c371acf5 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 2 Jan 2016 12:03:33 -0300 Subject: Change rb+ to wb+ on file access READ_WRITE to allow more use cases, closes #2278 --- drivers/unix/file_access_unix.cpp | 2 +- drivers/windows/file_access_windows.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 9843405d4a..349831077c 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="rb+"; + mode_string="wb+"; else return ERR_INVALID_PARAMETER; diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index 0de686ed53..818e4258ba 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -71,7 +71,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"rb+"; + mode_string=L"wb+"; else return ERR_INVALID_PARAMETER; -- cgit v1.2.3