summaryrefslogtreecommitdiffstats
path: root/src/imgui
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-05-17 11:26:57 +1000
committerDave Airlie <[email protected]>2019-05-17 12:33:09 +1000
commitebdddb36a0418caf0b80810c3641ee237905a5e0 (patch)
tree10d872e8ea233006d4e47b1699017643e4228637 /src/imgui
parent2bfe5b85561f9317ad2ce28baa06e06155ea3fe7 (diff)
imgui: fix undefined behaviour bitshift.
imgui_draw.cpp:1781: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour Reported by coverity Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/imgui')
-rw-r--r--src/imgui/imgui_draw.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imgui/imgui_draw.cpp b/src/imgui/imgui_draw.cpp
index 1d4e1d51692..c69c01ee801 100644
--- a/src/imgui/imgui_draw.cpp
+++ b/src/imgui/imgui_draw.cpp
@@ -1778,7 +1778,7 @@ static void UnpackBoolVectorToFlatIndexList(const ImBoolVector* in, ImVector<int
for (const int* it = it_begin; it < it_end; it++)
if (int entries_32 = *it)
for (int bit_n = 0; bit_n < 32; bit_n++)
- if (entries_32 & (1 << bit_n))
+ if (entries_32 & (1u << bit_n))
out->push_back((int)((it - it_begin) << 5) + bit_n);
}