Fix compilation with MSVC by using sprintf instead of snprintf

snprintf is part of c99 standard, not supported by MS compilers
This commit is contained in:
Lambert Clara
2012-08-12 12:29:55 +02:00
parent 2f095cc9e3
commit 704e56fc81
3 changed files with 11 additions and 11 deletions
+5 -5
View File
@@ -53,11 +53,11 @@ static const char* format_mode(GLFWvidmode* mode)
{
static char buffer[512];
snprintf(buffer, sizeof(buffer),
"%i x %i x %i (%i %i %i)",
mode->width, mode->height,
mode->redBits + mode->greenBits + mode->blueBits,
mode->redBits, mode->greenBits, mode->blueBits);
sprintf(buffer,
"%i x %i x %i (%i %i %i)",
mode->width, mode->height,
mode->redBits + mode->greenBits + mode->blueBits,
mode->redBits, mode->greenBits, mode->blueBits);
buffer[sizeof(buffer) - 1] = '\0';
return buffer;