From 0dad3f436b2ae06267ee9c8e2df39bc6cd9d9e18 Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 30 Sep 2019 15:16:30 +0200 Subject: [PATCH] Fix harmless float calculation overflow. (#2813) --- imgui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index cee65ff8..77eeb4c4 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2711,6 +2711,8 @@ ImGuiWindow::ImGuiWindow(ImGuiContext* context, const char* name) SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = ImGuiCond_Always | ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing; SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX); + InnerRect = ImRect(0.0f, 0.0f, 0.0f, 0.0f); // Clear so the InnerRect.GetSize() code in Begin() doesn't lead to overflow even if the result isn't used. + LastFrameActive = -1; LastTimeActive = -1.0f; ItemWidthDefault = 0.0f;