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:
+4
-4
@@ -79,10 +79,10 @@ static void update_window_title(GLFWwindow* window)
|
||||
{
|
||||
char title[256];
|
||||
|
||||
sprintf(title, "Tearing detector (interval %i%s, %0.1f Hz)",
|
||||
swap_interval,
|
||||
(swap_tear && swap_interval < 0) ? " (swap tear)" : "",
|
||||
frame_rate);
|
||||
snprintf(title, sizeof(title), "Tearing detector (interval %i%s, %0.1f Hz)",
|
||||
swap_interval,
|
||||
(swap_tear && swap_interval < 0) ? " (swap tear)" : "",
|
||||
frame_rate);
|
||||
|
||||
glfwSetWindowTitle(window, title);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user