diff --git a/sc2/src/sc2code/libs/graphics/font.c b/sc2/src/sc2code/libs/graphics/font.c index 0d0dc5b7e..bcd2dd04d 100644 --- a/sc2/src/sc2code/libs/graphics/font.c +++ b/sc2/src/sc2code/libs/graphics/font.c @@ -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;