Skip to content

Commit ab0a893

Browse files
rokupssergeyn
authored andcommitted
Backends: Glut: Fix comparison operator precedence.
1 parent afbc9e5 commit ab0a893

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/imgui_impl_glut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void ImGui_ImplGLUT_MouseFunc(int glut_button, int state, int x, int y)
269269
if (glut_button == GLUT_LEFT_BUTTON) button = 0;
270270
if (glut_button == GLUT_RIGHT_BUTTON) button = 1;
271271
if (glut_button == GLUT_MIDDLE_BUTTON) button = 2;
272-
if (button != -1 && state == GLUT_DOWN || state == GLUT_UP)
272+
if (button != -1 && (state == GLUT_DOWN || state == GLUT_UP))
273273
io.AddMouseButtonEvent(button, state == GLUT_DOWN);
274274
}
275275

0 commit comments

Comments
 (0)