From 81ebb229ae964d92e536fadb901c749b335cedca Mon Sep 17 00:00:00 2001 From: derselbst Date: Sun, 31 Dec 2017 16:21:01 +0100 Subject: [PATCH] elaborate on _[v]snprintf() --- src/utils/fluidsynth_priv.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/fluidsynth_priv.h b/src/utils/fluidsynth_priv.h index b0e7b746..c9919d9a 100644 --- a/src/utils/fluidsynth_priv.h +++ b/src/utils/fluidsynth_priv.h @@ -256,6 +256,10 @@ do { strncpy(_dst,_src,_n); \ #define FLUID_FPRINTF fprintf #if (defined(WIN32) && _MSC_VER < 1900) || defined(MINGW32) + /* need to make sure we use a C99 compliant implementation of (v)snprintf(), + * i.e. not microsofts non compliant extension _snprintf() as it doesnt + * reliably null-terminates the buffer + */ #define FLUID_SNPRINTF g_snprintf #else #define FLUID_SNPRINTF snprintf