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>2013-02-13 13:05:34 +0400
committerBrodie Thiesfield <brofield@gmail.com>2013-02-13 13:05:34 +0400
commit1f733ca3346c128bafb25747798da4ba9dc01215 (patch)
treea6ae4de775d86500f330fef619b8887b1f04aeaa
parent50284d3a634eb1173abac87e12d3c3addd8d3775 (diff)
Fix for issue 7: mbstowcs with NULL dest is not supported by all libraries
-rw-r--r--SimpleIni.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/SimpleIni.h b/SimpleIni.h
index 534e190..5c9b82a 100644
--- a/SimpleIni.h
+++ b/SimpleIni.h
@@ -2837,9 +2837,9 @@ public:
return a_uInputDataLen;
}
-#if !defined(_WIN32) && !defined(_linux)
- // fall back processing for platforms that don't support C99 usage of mbstowcs
- // worst case scenario is 1:1, this should be a sufficient buffer size
+#if defined(SI_NO_MBSTOWCS_NULL) || (!defined(_MSC_VER) && !defined(_linux))
+ // fall back processing for platforms that don't support a NULL dest to mbstowcs
+ // worst case scenario is 1:1, this will be a sufficient buffer size
return a_uInputDataLen;
#else
// get the actual required buffer size