free some memory; remove obsolete sanity check
This commit is contained in:
parent
1f588d2640
commit
872d028a77
1 changed files with 2 additions and 1 deletions
|
|
@ -14613,7 +14613,7 @@ static int charset_works(TTF_Font *font, const char *s)
|
||||||
unsigned offset = 0;
|
unsigned offset = 0;
|
||||||
do
|
do
|
||||||
c[offset++] = *s++;
|
c[offset++] = *s++;
|
||||||
while(offset<5 && (*s & 0xc0u) == 0x80u); // assume safe input
|
while((*s & 0xc0u) == 0x80u); // assume safe input
|
||||||
c[offset++] = '\0';
|
c[offset++] = '\0';
|
||||||
SDL_Surface *tmp_surf = TTF_RenderUTF8_Blended(font, c, black);
|
SDL_Surface *tmp_surf = TTF_RenderUTF8_Blended(font, c, black);
|
||||||
if(!tmp_surf)
|
if(!tmp_surf)
|
||||||
|
|
@ -14629,6 +14629,7 @@ static int charset_works(TTF_Font *font, const char *s)
|
||||||
out:
|
out:
|
||||||
while(count--)
|
while(count--)
|
||||||
SDL_FreeSurface(surfs[count]);
|
SDL_FreeSurface(surfs[count]);
|
||||||
|
free(surfs);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue