Fix: Capture current by reference to avoid stale value

This commit is contained in:
Nitin Kumar 2026-04-16 17:46:39 +05:30
parent 79d5698253
commit 3358ea8408
1 changed files with 1 additions and 1 deletions

View File

@ -2271,7 +2271,7 @@ wrap_text
// that [itr, current] doesn't contains any space.
// either its called with itr = std::next(current)
// or with an itr <= current in case of word splitting
auto reset_line_start = [&size, &startLine, &lastSpace, &contentEnd, &lastSpaceContentEnd, current](Iterator itr, Iterator lineContentEnd) {
auto reset_line_start = [&size, &startLine, &lastSpace, &contentEnd, &lastSpaceContentEnd, &current](Iterator itr, Iterator lineContentEnd) {
startLine = itr;
lastSpace = startLine;
contentEnd = lineContentEnd;