diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-07-27 15:25:29 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-27 12:57:27 +0200 |
commit | f8becd4df86eae4895f580b76921032586ff675a (patch) | |
tree | fce47b4ff5708eefee3773b2e5ead211b8f1a443 /Demos | |
parent | 2c6a983b34b022153f3b8af2b811e616647679bf (diff) | |
download | serenity-f8becd4df86eae4895f580b76921032586ff675a.zip |
Eyes: Fix division by zero when invoked as 'Eyes'
Diffstat (limited to 'Demos')
-rw-r--r-- | Demos/Eyes/EyesWidget.h | 2 |
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; |