Code cleanup - eradicate sprintf

This commit is contained in:
Bruno Herbelin
2023-08-08 23:31:11 +02:00
parent ebd59e38ce
commit c2a0e51984
11 changed files with 62 additions and 62 deletions

View File

@@ -202,7 +202,7 @@ void WorkspaceWindow::Update()
ImGui::SetNextWindowPos(window->Pos, ImGuiCond_Always);
ImGui::SetNextWindowSize(window->Size, ImGuiCond_Always);
char nameoverlay[64];
sprintf(nameoverlay, "%sOverlay", name_);
snprintf(nameoverlay, 64, "%sOverlay", name_);
if (ImGui::Begin(nameoverlay, NULL, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings ))
{
// exit workspace clear mode if user clics on the window