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:
authorBrodie Thiesfield <brofield@gmail.com>2009-09-11 08:32:59 +0400
committerBrodie Thiesfield <brofield@gmail.com>2009-09-11 08:32:59 +0400
commit1715d525df8efb59a7789240103f42a5ec50b3b8 (patch)
treebeab5d2c2db23d49a1399e1d49fb68ff0dd1b08a
parent720823c939463c83e0ef27e724f8feb9795d9218 (diff)
Fix for security warnings with VC9
-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);