diff options
| author | Yujon Pradhananga <139200034+Yujonpradhananga@users.noreply.github.com> | 2026-03-08 00:58:06 +0545 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-07 19:13:06 +0000 |
| commit | 3cf62bea185384aa3c5442a2c5448ae1d62c9c0e (patch) | |
| tree | 7f3defec6f081476ad9e8d8217d67c80f2331125 /src/layout/algorithm/tiled | |
| parent | 4aee773d9b95ef777125d14948ccff440912690e (diff) | |
algo/scroll: fix unsigned wrap (#13634)
Diffstat (limited to 'src/layout/algorithm/tiled')
| -rw-r--r-- | src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp index ae7c6ecc..7b9a1752 100644 --- a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp +++ b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp @@ -260,6 +260,9 @@ bool SColumnData::up(SP<SScrollingTargetData> w) { } bool SColumnData::down(SP<SScrollingTargetData> w) { + if (targetDatas.empty()) + return false; + for (size_t i = 0; i < targetDatas.size() - 1; ++i) { if (targetDatas[i] != w) continue; |
