sc/source/filter/html/htmlpars.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit d5823f417248663d78072e2a0be162175def2235 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed Apr 24 20:10:38 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Apr 25 09:28:05 2024 +0200 ofz#68269 more fixes to sc html parser Change-Id: I2fd889c438d4707a4e174a5a4300e742cd895d3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166607 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index cba641f5136f..6e87e67fe2af 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -689,7 +689,7 @@ void ScHTMLLayoutParser::Adjust() if ( pE->nCol != nColBeforeSkip ) { size_t nCount = maColOffset.size(); - if ( nCount <= o3tl::make_unsigned(pE->nCol) ) + if (pE->nCol < 0 || nCount <= o3tl::make_unsigned(pE->nCol)) { pE->nOffset = static_cast<sal_uInt16>(maColOffset[nCount-1]); MakeCol( &maColOffset, pE->nOffset, pE->nWidth, nOffsetTolerance, nOffsetTolerance );