From 3cf62bea185384aa3c5442a2c5448ae1d62c9c0e Mon Sep 17 00:00:00 2001 From: Yujon Pradhananga <139200034+Yujonpradhananga@users.noreply.github.com> Date: Sun, 8 Mar 2026 00:58:06 +0545 Subject: algo/scroll: fix unsigned wrap (#13634) --- src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/layout/algorithm') 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 w) { } bool SColumnData::down(SP w) { + if (targetDatas.empty()) + return false; + for (size_t i = 0; i < targetDatas.size() - 1; ++i) { if (targetDatas[i] != w) continue; -- cgit v1.2.3