mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
Test for an invalid rect in drawText
This commit is contained in:
parent
3744b3cf2b
commit
259caade5d
1 changed files with 5 additions and 0 deletions
|
@ -2015,6 +2015,11 @@ void Bitmap::drawText(const IntRect &rect, const char *str, int align)
|
|||
GUARD_MEGA;
|
||||
GUARD_ANIMATED;
|
||||
|
||||
// RGSS doesn't let you draw text backwards
|
||||
if (rect.w <= 0 || rect.h <= 0 || rect.x >= width() || rect.y >= height() ||
|
||||
rect.w < -rect.x || rect.h < -rect.y)
|
||||
return;
|
||||
|
||||
if (hasHires()) {
|
||||
Font &loresFont = getFont();
|
||||
Font &hiresFont = p->selfHires->getFont();
|
||||
|
|
Loading…
Add table
Reference in a new issue