mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Prefer snprintf over sprintf in OpenGL
This commit is contained in:
@@ -2420,8 +2420,7 @@ const char *OpenGL::errorString(GLenum errorcode)
|
||||
|
||||
static char text[64] = {};
|
||||
|
||||
memset(text, 0, sizeof(text));
|
||||
sprintf(text, "0x%x", errorcode);
|
||||
snprintf(text, sizeof(text), "0x%x", errorcode);
|
||||
|
||||
return text;
|
||||
}
|
||||
@@ -2450,8 +2449,7 @@ const char *OpenGL::framebufferStatusString(GLenum status)
|
||||
|
||||
static char text[64] = {};
|
||||
|
||||
memset(text, 0, sizeof(text));
|
||||
sprintf(text, "0x%x", status);
|
||||
snprintf(text, sizeof(text), "0x%x", status);
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user