diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-26 21:12:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-28 12:17:25 +0200 |
commit | d2e937d93f0646480d92101115e5b4a4f41f2acc (patch) | |
tree | a5cad5d6c5385398d4990316e92e712abec1dccc | |
parent | 10464b74097f114bb73e6e4aaece7aebc43ed680 (diff) |
cid#1606927 silence Overflowed constant
Change-Id: I4c111bbdbf9d600a1d75a071010164b56d0ed06b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172510
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index ab2dbdc242a6..c3abc3d1b0e3 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1197,14 +1197,17 @@ SwFltStackEntry* SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt1 if (m_rReader.m_xPlcxMan && m_rReader.m_xPlcxMan->GetDoingDrawTextBox()) { size_t nCnt = size(); - for (size_t i=0; i < nCnt; ++i) + size_t i = 0; + while (i < nCnt) { SwFltStackEntry& rEntry = (*this)[i]; if (nAttrId == rEntry.m_pAttr->Which()) { - DeleteAndDestroy(i--); + DeleteAndDestroy(i); --nCnt; + break; } + ++i; } } else // Normal case, set the attribute into the document |