font.c: set null dimensions on null str
This commit is contained in:
parent
7bc58ab0e6
commit
bebf6d6b5f
|
@ -9,6 +9,17 @@ static int renderstr(const enum font f, const short x, short y,
|
|||
const char *str, const bool render, short *const max_x,
|
||||
short *const max_y)
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
if (max_x)
|
||||
*max_x = 0;
|
||||
|
||||
if (max_y)
|
||||
*max_y = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct cfg
|
||||
{
|
||||
const struct sprite *s;
|
||||
|
|
Loading…
Reference in New Issue