mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Minor fix to avoid undefined behavior sanitizer triggering (#3276)
This commit is contained in:
parent
53dfccbe4b
commit
79fbab543d
@ -3516,7 +3516,7 @@ static void ImGui::UpdateMouseInputs()
|
||||
ImVec2 delta_from_click_pos = IsMousePosValid(&g.IO.MousePos) ? (g.IO.MousePos - g.IO.MouseClickedPos[i]) : ImVec2(0.0f, 0.0f);
|
||||
if (ImLengthSqr(delta_from_click_pos) < g.IO.MouseDoubleClickMaxDist * g.IO.MouseDoubleClickMaxDist)
|
||||
g.IO.MouseDoubleClicked[i] = true;
|
||||
g.IO.MouseClickedTime[i] = -DBL_MAX; // so the third click isn't turned into a double-click
|
||||
g.IO.MouseClickedTime[i] = -g.IO.MouseDoubleClickTime * 2.0f; // Mark as "old enough" so the third click isn't turned into a double-click
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user