family_info.filename is an array; index into it!
h/t Shin-ichi for reporting the warning warning: the comparison will always evaluate as 'true' for the address of 'filename' will never be NULL [-Waddress]
This commit is contained in:
parent
fc2e7d1302
commit
342630cb9d
1 changed files with 2 additions and 2 deletions
|
|
@ -1354,7 +1354,7 @@ TuxPaint_Font *getfonthandle(int desire)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fi->filename != NULL)
|
if (fi->filename[text_state] != NULL)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("%s:%d - Setting 'name' to fi->filename[%d (0x%x)]\n", __FILE__, __LINE__, (int)text_state, (int)text_state);
|
printf("%s:%d - Setting 'name' to fi->filename[%d (0x%x)]\n", __FILE__, __LINE__, (int)text_state, (int)text_state);
|
||||||
|
|
@ -1371,7 +1371,7 @@ TuxPaint_Font *getfonthandle(int desire)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("%s:%d - fi->filename is NULL\n", __FILE__, __LINE__);
|
printf("%s:%d - fi->filename[%d (0x%x) is NULL\n", __FILE__, __LINE__, (int)text_state, (int)text_state);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue