-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
signed overflow in "slider s32 full" demo widget #6675
Comments
Oh, quite true that, same for 64 bits. The expected behavior would be a division by a large negative number, resulting in a small negative number that then gets clamped to @ocornut: replacing |
I changed the definition of Lines 2851 to 2852 in f7eea63
|
Merged b7a7d67, thanks! |
Version/Branch of Dear ImGui:
My Issue/Question:
The demo widget "slider s32 full" creates an integer overflow that my compiler in debug traps with an illegal instruction. Signed overflow is UB IIRC.
Concretely, the issue is with
v_range + 1
here:imgui/imgui_widgets.cpp
Lines 2781 to 2782 in f7eea63
With
v_range
for "slider s32 full" being 2147483647 = 231-1.The text was updated successfully, but these errors were encountered: