sw/source/core/table/swtable.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit aeeb0141aca4f1698b09bc8f06ded41247b54279 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue May 31 13:42:23 2022 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Jun 1 14:11:10 2022 +0200 sw: avoid another EXCEPTION_INT_DIVIDE_BY_ZERO See https://crashreport.libreoffice.org/stats/signature/lcl_ModifyBoxes Change-Id: I786bbf87734dd3963bd84caecc5c5f45693d42c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135185 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index da2c2f4a9ae8..89b6e50e4c1e 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -300,7 +300,7 @@ static void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const tools::Long nOld, sal_uInt64 nBox = pFormat->GetFrameSize().GetWidth(); nOriginalSum += nBox; nBox *= nNew; - nBox /= nOld; + nBox = nOld == 0 ? nBox : nBox / nOld; const sal_uInt64 nWishedSum = lcl_MulDiv64<sal_uInt64>(nOriginalSum, nNew, nOld) - nSum; if( nWishedSum > 0 ) {