diff --git a/examples/vwebp.c b/examples/vwebp.c index 4e98220f..553a603b 100644 --- a/examples/vwebp.c +++ b/examples/vwebp.c @@ -30,6 +30,10 @@ #endif #endif +#ifdef _MSC_VER +#define snprintf _snprintf +#endif + // Unfortunate global variables static const WebPDecBuffer* kPic = NULL; static const char* file_name = NULL; @@ -87,12 +91,12 @@ static void HandleDisplay(void) { char tmp[32]; glColor4f(0.0, 0.0, 0.0, 0.0); - glRasterPos2f(-0.95, 0.90); + glRasterPos2f(-0.95f, 0.90f); PrintString(file_name); snprintf(tmp, sizeof(tmp), "Dimension:%d x %d", kPic->width, kPic->height); glColor4f(0.0, 0.0, 0.0, 0.0); - glRasterPos2f(-0.95, 0.80); + glRasterPos2f(-0.95f, 0.80f); PrintString(tmp); } glFlush();