aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-09-15 02:25:11 +0000
committernyamatongwe <unknown>2002-09-15 02:25:11 +0000
commit064d956da8fe7d823eba5a584675e9cdfdd14451 (patch)
treec63da91ad4b3dd29a59ef219a0f486014d0ff741
parente5cf6386ef2a982101286f2f7cea08895de59486 (diff)
downloadscintilla-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.cxx6
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);
}
}