summaryrefslogtreecommitdiff
path: root/drivers/windows
diff options
context:
space:
mode:
authorDualtagh Murray <dualtagh.murray@gonitro.com>2018-10-04 14:38:52 +0100
committerRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-19 11:45:24 +0200
commitb902a2f2a7438810cdcb053568ed5c27089b1e8a (patch)
tree0a70fb9dd0093ea6f3ad024616c665f9669077ff /drivers/windows
parenta3072aa35e3bfd69d826fa33328b3ce1862f472a (diff)
Fixing warnings generated by MSVC
Fixes #22684.
Diffstat (limited to 'drivers/windows')
-rw-r--r--drivers/windows/file_access_windows.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index b4492a2022..2582478259 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -114,7 +114,7 @@ Error FileAccessWindows::_open(const String &p_path, int p_mode_flags) {
path = path + ".tmp";
}
- f = _wfopen(path.c_str(), mode_string);
+ _wfopen_s(&f, path.c_str(), mode_string);
if (f == NULL) {
last_error = ERR_FILE_CANT_OPEN;
@@ -278,7 +278,7 @@ bool FileAccessWindows::file_exists(const String &p_name) {
FILE *g;
//printf("opening file %s\n", p_fname.c_str());
String filename = fix_path(p_name);
- g = _wfopen(filename.c_str(), L"rb");
+ _wfopen_s(&g, filename.c_str(), L"rb");
if (g == NULL) {
return false;