diff options
| author | nyamatongwe <devnull@localhost> | 2011-04-16 13:53:00 +1000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2011-04-16 13:53:00 +1000 |
| commit | 59766c7c201c45b3a6c6111e8e0ed4c40625e637 (patch) | |
| tree | 10d1962a7c9993d602b3d68e3096c53b5d788948 | |
| parent | 4012f14e6397f5709586102540df824d8c9ca4a5 (diff) | |
| download | scintilla-mirror-59766c7c201c45b3a6c6111e8e0ed4c40625e637.tar.gz | |
Avoid bad text measurement with very long pieces of text. Bug #3286637.
| -rw-r--r-- | win32/PlatWin.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 <stdarg.h> #include <stdio.h> #include <time.h> +#include <limits.h> #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; |
