projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bfe5b8
)
imgui: fix undefined behaviour bitshift.
author
Dave Airlie
<airlied@redhat.com>
Fri, 17 May 2019 01:26:57 +0000
(11:26 +1000)
committer
Dave Airlie
<airlied@redhat.com>
Fri, 17 May 2019 02:33:09 +0000
(12:33 +1000)
imgui_draw.cpp:1781: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
Reported by coverity
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/imgui/imgui_draw.cpp
patch
|
blob
|
history
diff --git
a/src/imgui/imgui_draw.cpp
b/src/imgui/imgui_draw.cpp
index 1d4e1d51692a9d236ad09a6da84d9ab73a985395..c69c01ee8018aae6fb04639291d058c00f7fda29 100644
(file)
--- 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 & (1
u
<< bit_n))
out->push_back((int)((it - it_begin) << 5) + bit_n);
}