mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Replace sprintf with snprintf
This commit is contained in:
+2
-2
@@ -221,7 +221,7 @@ static const char* get_button_name(int button)
|
||||
default:
|
||||
{
|
||||
static char name[16];
|
||||
sprintf(name, "%i", button);
|
||||
snprintf(name, sizeof(name), "%i", button);
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -555,7 +555,7 @@ int main(int argc, char** argv)
|
||||
slots[i].closeable = GLFW_TRUE;
|
||||
slots[i].number = i + 1;
|
||||
|
||||
sprintf(title, "Event Linter (Window %i)", slots[i].number);
|
||||
snprintf(title, sizeof(title), "Event Linter (Window %i)", slots[i].number);
|
||||
|
||||
if (monitor)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user