cid#1607834 Overflowed constant

Change-Id: If09eb49bd8549defe512193817d23e27e565ffdb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174683
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-10-06 15:33:48 +01:00
parent ad6dd34fd1
commit 38c47c91ab

View file

@ -1079,8 +1079,8 @@ void WW8_WrPlcPn::WritePlc()
m_Fkps[ i ]->GetStartFc() );
}
SwWW8Writer::WriteLong( *m_rWrt.m_pTableStrm,
m_Fkps[ i - 1 ]->GetEndFc() );
WW8_FC nEndFc = i > 0 ? m_Fkps[i - 1]->GetEndFc() : 0;
SwWW8Writer::WriteLong(*m_rWrt.m_pTableStrm, nEndFc);
// for every FKP output the page
for (i = 0; i < m_Fkps.size(); ++i)