From e4ef140e10ebcba0eb28a500860a982313ae0722 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 30 Aug 2015 18:55:46 +0100 Subject: [PATCH] Speculative Linux build fix, not using itoa (#246) --- imgui_demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 5556d629..602a527a 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -959,7 +959,7 @@ void ImGui::ShowTestWindow(bool* opened) if (n > 0) ImGui::SameLine(); ImGui::PushID(n + line * 1000); char num_buf[16]; - const char* label = (!(n%15)) ? "FizzBuzz" : (!(n%3)) ? "Fizz" : (!(n%5)) ? "Buzz" : itoa(n, num_buf, 10); + const char* label = (!(n%15)) ? "FizzBuzz" : (!(n%3)) ? "Fizz" : (!(n%5)) ? "Buzz" : (sprintf(num_buf, "%d", n), num_buf); float hue = n*0.05f; ImGui::PushStyleColor(ImGuiCol_Button, ImColor::HSV(hue, 0.6f, 0.6f)); ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImColor::HSV(hue, 0.7f, 0.7f));