diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-19 14:10:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-19 20:01:01 +0100 |
commit | bd5492275d31f59b1d269205018d1487af52426f (patch) | |
tree | 7743774f30e1aef485704f88db7996ad1aed65dc /sw | |
parent | 2064cdb1cd908a3ee55a54f0aeb4aee15f7c12da (diff) |
print out a debug warning when we ignore dodgy processing
Change-Id: I92d758caea3942e6a2fccdf9eb1f8019c5acae14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128614
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 16af09c8ccbf..6b1c68bf3313 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1231,7 +1231,8 @@ void SwTextPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const continue; } if ((i + TextFrameIndex(1) ).get() > GetText().getLength()) - ; // prevent crash by not passing bad data down to GetTextSize->SwDrawTextInfo + // prevent crash by not passing bad data down to GetTextSize->SwDrawTextInfo + SAL_WARN("sw", "something dodgy, clamping text index to prevent crash"); else if (i >= TextFrameIndex(GetText().getLength()) || GetText()[sal_Int32(i)] != CH_BLANK) { |