diff options
author | nyamatongwe <unknown> | 2002-09-15 02:25:11 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-09-15 02:25:11 +0000 |
commit | 064d956da8fe7d823eba5a584675e9cdfdd14451 (patch) | |
tree | c63da91ad4b3dd29a59ef219a0f486014d0ff741 | |
parent | e5cf6386ef2a982101286f2f7cea08895de59486 (diff) | |
download | scintilla-mirror-064d956da8fe7d823eba5a584675e9cdfdd14451.tar.gz |
Limiting the number of characters to ExtTextOut to be less than 65536
as there appears to be a GDI 16 bit limitation.
-rw-r--r-- | win32/PlatWin.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 8b7373cc5..3bfd923ae 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -501,6 +501,9 @@ void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const ch tbuf[tlen] = L'\0'; ::ExtTextOutW(hdc, rc.left, ybase, ETO_OPAQUE, &rcw, tbuf, tlen, NULL); } else { + // There appears to be a 16 bit string length limit in GDI + if (len > 65535) + len = 65535; ::ExtTextOut(hdc, rc.left, ybase, ETO_OPAQUE, &rcw, s, len, NULL); } } @@ -517,6 +520,9 @@ void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font_, int ybase, const c tbuf[tlen] = L'\0'; ::ExtTextOutW(hdc, rc.left, ybase, ETO_OPAQUE | ETO_CLIPPED, &rcw, tbuf, tlen, NULL); } else { + // There appears to be a 16 bit string length limit in GDI + if (len > 65535) + len = 65535; ::ExtTextOut(hdc, rc.left, ybase, ETO_OPAQUE | ETO_CLIPPED, &rcw, s, len, NULL); } } |