Descend the array in the right way
Summary:
Detected by cppcheck as Opposite inner 'if' condition leads to a dead code block (outer condition is 'j>0' and inner condition is 'j==0').
The array is 0 based, therefore [0-4].
Test Plan: make test passes
Reviewers: Krita, dkazakov
Reviewed By: Krita, dkazakov
Subscribers: dkazakov
Tags: Krita
Differential Revision: https://phabricator.kde.org/D15905