From d6f98958d5c32e19a7924883a4bf8cc4fad4282e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 16 Apr 2011 13:53:00 +1000 Subject: Avoid bad text measurement with very long pieces of text. Bug #3286637. --- win32/PlatWin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index c9bb433e4..ec6c3e383 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -11,6 +11,7 @@ #include #include #include +#include #undef _WIN32_WINNT #define _WIN32_WINNT 0x0500 @@ -441,7 +442,7 @@ SurfaceImpl::SurfaceImpl() : bitmap(0), bitmapOld(0), paletteOld(0) { // Windows 9x has only a 16 bit coordinate system so break after 30000 pixels - maxWidthMeasure = IsNT() ? 1000000 : 30000; + maxWidthMeasure = IsNT() ? INT_MAX : 30000; // There appears to be a 16 bit string length limit in GDI on NT and a limit of // 8192 characters on Windows 95. maxLenText = IsNT() ? 65535 : 8192; -- cgit v1.2.3