Fix handling non-present chars at end of line

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2165 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2006-01-12 03:48:37 +00:00
parent fecb74d3cd
commit 5c593be13f
+5 -2
View File
@@ -204,8 +204,11 @@ TextRect (PTEXT lpText, PRECT pRect, PBYTE pdelta)
if (width > 0 && (bot_y -= top_y) > 0)
{
/* subtract off default character spacing */
--pdelta[-1];
--width;
if (pdelta[-1] > 0)
{
--pdelta[-1];
--width;
}
if (lpText->align == ALIGN_LEFT)
pRect->corner.x = 0;