From 0facb2ab7f766bb6279dd5a7929f7d9fdec6e087 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 2 Aug 2013 13:31:48 +1000 Subject: Fix failures when invalid DBCS text was measured by ensuring all positions are filled with reasonable non-negative values. --- win32/PlatWin.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 97d7eddb5..0b57037af 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -1747,14 +1747,17 @@ void SurfaceD2D::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION * } else { // May be more than one byte per position - int ui = 0; + unsigned int ui = 0; + FLOAT position = 0.0f; for (int i=0;i