free some memory; remove obsolete sanity check

This commit is contained in:
Albert Cahalan 2005-01-13 04:35:46 +00:00
parent 1f588d2640
commit 872d028a77

View file

@ -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;
} }