Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/simpleini.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'SimpleIni.h')
-rw-r--r--SimpleIni.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/SimpleIni.h b/SimpleIni.h
index 69ad663..eced7f8 100644
--- a/SimpleIni.h
+++ b/SimpleIni.h
@@ -2212,7 +2212,12 @@ CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::SaveFile(
) const
{
#ifdef _WIN32
- FILE * fp = _wfopen(a_pwszFile, L"wb");
+ FILE * fp = NULL;
+#if __STDC_WANT_SECURE_LIB__ && !_WIN32_WCE
+ _wfopen_s(&fp, a_pwszFile, L"wb");
+#else // !__STDC_WANT_SECURE_LIB__
+ fp = _wfopen(a_pwszFile, L"wb");
+#endif // __STDC_WANT_SECURE_LIB__
if (!fp) return SI_FILE;
SI_Error rc = SaveFile(fp, a_bAddSignature);
fclose(fp);