summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-09 09:17:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-09 09:17:25 +0200
commit51030a1a5e06cd22de7676715ae65f37e6ad5548 (patch)
tree68f78d8a14ee52d43391e9ba56022b77c10cbad6 /vcl/quartz
parentd5874376a7db53a4b0e8b3fabb902d14639032cc (diff)
Handle all-space corner case
Change-Id: I07981a63a30ac3d610be03e736188a6539884f01
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/ctlayout.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx
index 5c611500572f..7969991f11d2 100644
--- a/vcl/quartz/ctlayout.cxx
+++ b/vcl/quartz/ctlayout.cxx
@@ -175,7 +175,8 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
if(rArgs.mpDXArray)
{
int nFullPixelWidth = nPixelWidth;
- nPixelWidth = rArgs.mpDXArray[ mnCharCount - mnTrailingSpaceCount - 1];
+ nPixelWidth = mnTrailingSpaceCount == mnCharCount
+ ? 0 : rArgs.mpDXArray[ mnCharCount - mnTrailingSpaceCount - 1];
mfTrailingSpaceWidth = nFullPixelWidth - nPixelWidth;
}
else