https://bugs.kde.org/show_bug.cgi?id=421079

Tymond <tamtamy.tym...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/kde/
                   |                            |krita/commit/10d47bd625663e
                   |                            |d576ccc527f3219e8aa133995f
             Status|REPORTED                    |RESOLVED

--- Comment #1 from Tymond <tamtamy.tym...@gmail.com> ---
Git commit 10d47bd625663ed576ccc527f3219e8aa133995f by Agata Cacko.
Committed on 06/05/2020 at 00:44.
Pushed by tymond into branch 'master'.

Change order in conditions in while() in KoZoomAction

Before this commit, while loop would first check the value of the
array in a specific index and only later if the index is in range.
That shouldn't lead to any problems per se unless the array is very
short, because it always starts from the other end of the array and
the loop ends before the index can fall out of range.
However it seems like it triggered some statis analysis tool and it
might potentially deceive a future programmer if some of the external
conditions (like the starting index) changes.
This commit reverses the order of the conditions so the index is checked
first.

M  +4    -3    libs/widgets/KoZoomAction.cpp

https://invent.kde.org/kde/krita/commit/10d47bd625663ed576ccc527f3219e8aa133995f

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to