Feature #892 ยป 0045-sdl3-Update-TTF_SizeUTF8-return-value-checking.patch
client/gui-sdl3/gui_string.c | ||
---|---|---|
w = 0;
|
||
h = 0;
|
||
while (utf8_texts[count]) {
|
||
if (TTF_SizeUTF8(pstr->font, utf8_texts[count], &ww, &hh) < 0) {
|
||
if (!TTF_SizeUTF8(pstr->font, utf8_texts[count], &ww, &hh)) {
|
||
do {
|
||
FC_FREE(utf8_texts[count]);
|
||
count++;
|
||
... | ... | |
count++;
|
||
}
|
||
} else {
|
||
if (TTF_SizeUTF8(pstr->font, pstr->text, &w, &h) < 0) {
|
||
if (!TTF_SizeUTF8(pstr->font, pstr->text, &w, &h)) {
|
||
log_error("TTF_SizeUTF8() return ERROR!");
|
||
}
|
||
}
|