MSVC has _snprintf but no snprintf (go figure)
authorJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 15 Nov 2002 19:32:37 +0000 (19:32 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 15 Nov 2002 19:32:37 +0000 (19:32 +0000)
src/share/grabbag/replaygain.c

index 5c262e4..6b56933 100644 (file)
@@ -84,7 +84,11 @@ static FLAC__bool append_tag_(FLAC__StreamMetadata *block, const char *format, c
        FLAC__ASSERT(0 != value);
 
        buffer[sizeof(buffer)-1] = '\0';
+#if defined _MSC_VER || defined __MINGW32__
+       _snprintf(buffer, sizeof(buffer)-1, format, name, value);
+#else
        snprintf(buffer, sizeof(buffer)-1, format, name, value);
+#endif
 
        entry.entry = buffer;
        entry.length = strlen(buffer);