summaryrefslogtreecommitdiff
path: root/Demos
diff options
context:
space:
mode:
Diffstat (limited to 'Demos')
-rw-r--r--Demos/Eyes/EyesWidget.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Demos/Eyes/EyesWidget.h b/Demos/Eyes/EyesWidget.h
index c03f87b291..fb01e27a45 100644
--- a/Demos/Eyes/EyesWidget.h
+++ b/Demos/Eyes/EyesWidget.h
@@ -42,7 +42,7 @@ private:
, m_extra_columns(extra)
{
m_num_rows = m_extra_columns > 0 ? m_full_rows + 1 : m_full_rows;
- m_eyes_in_row = (num_eyes - extra) / full_rows;
+ m_eyes_in_row = m_full_rows > 0 ? (num_eyes - m_extra_columns) / m_full_rows : m_extra_columns;
}
virtual void mousemove_event(GUI::MouseEvent&) override;