mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-10-04 21:07:56 +03:00
Merge pull request #106 from kichikuou/sact
sact_SP_TextDraw: Early return if sprite size is zero
This commit is contained in:
+1
-1
@@ -521,7 +521,7 @@ int _sact_SP_TextDraw(int sp_no, struct string *text, struct text_style *ts)
|
||||
// XXX: In AliceSoft's implementation, this function succeeds even with
|
||||
// a negative sp_no...
|
||||
struct sact_sprite *sp = sact_get_sprite(sp_no);
|
||||
if (!sp) return 0;
|
||||
if (!sp || !sp->rect.w || !sp->rect.h) return 0;
|
||||
sprite_text_draw(sp, text, ts);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user