bots2d icon indicating copy to clipboard operation
bots2d copied to clipboard

Compilation error in Ubuntu 20

Open embaba opened this issue 3 years ago • 1 comments

Compilation error in Ubuntu 20 + gcc 7.5 :

/home/xxx/bots2d/src/renderer/ImGuiOverlay.cpp: In static member function ‘static void ImGuiOverlay::text(std::__cxx11::string)’:
/home/xxx/bots2d/src/renderer/ImGuiOverlay.cpp:62:29: error: format not a string literal and no format arguments [-Werror=format-security]
     ImGui::Text(text.c_str());
                             ^
cc1plus: all warnings being treated as errors

Replacing

 ImGui::Text(text.c_str()); 

by

 ImGui::TextUnformatted(text.c_str());

seems to be the solution.

embaba avatar Apr 20 '22 13:04 embaba

Thanks for pointing this out. I will fix a patch for this.

niklasab avatar Jul 29 '23 09:07 niklasab