aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--win32/PlatWin.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index ddc121abc..22ee361ba 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -1012,6 +1012,8 @@ void SurfaceGDI::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *
} else if (fit < lenBlock) {
// For some reason, such as an incomplete DBCS character
// Not all the positions are filled in so make them equal to end.
+ if (fit == 0)
+ poses.buffer[fit++] = 0;
for (int i = fit;i<lenBlock;i++)
poses.buffer[i] = poses.buffer[fit-1];
}