vcl/source/gdi/CommonSalLayout.cxx | 1 + 1 file changed, 1 insertion(+)
New commits: commit 18a0c0c690eaa0df804cd2e3040c433ffd886275 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Sep 1 13:29:39 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Sep 1 15:45:52 2022 +0200 cid#513473 Division or modulo by zero I can't see how nGraphemeCount could be zero, so add an assert to help coverity out Change-Id: I324cc9819b401e5c1ab984446174ed2e96796eec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139165 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 70bfb07aea8a..d802070aa6c7 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -672,6 +672,7 @@ void GenericSalLayout::GetCharWidths(std::vector<DeviceCoordinate>& rCharWidths, css::i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); nGraphemeCount++; } + assert(nGraphemeCount > 0); // keep coverity happy if (!nGraphemeCount) continue;