mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 13:35:12 +00:00
Eyes: Fix division by zero when invoked as 'Eyes'
This commit is contained in:
parent
2c6a983b34
commit
f8becd4df8
Notes:
sideshowbarker
2024-07-19 04:34:20 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/f8becd4df86 Pull-request: https://github.com/SerenityOS/serenity/pull/2902
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue