From 38c47c91abc96c32f319bd6bd4015d6d9c04332f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 6 Oct 2024 15:33:48 +0100 Subject: [PATCH] cid#1607834 Overflowed constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If09eb49bd8549defe512193817d23e27e565ffdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174683 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- sw/source/filter/ww8/wrtww8.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 2d476ead766b..df4b5f6627c6 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -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)