From 1f733ca3346c128bafb25747798da4ba9dc01215 Mon Sep 17 00:00:00 2001 From: Brodie Thiesfield Date: Wed, 13 Feb 2013 09:05:34 +0000 Subject: Fix for issue 7: mbstowcs with NULL dest is not supported by all libraries --- SimpleIni.h | 6 +++--- 1 file 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 -- cgit v1.2.3