Warning suppression.

This commit is contained in:
William McBrine
2016-02-07 11:23:59 -05:00
parent 850a957359
commit 0d7e8edd7c

View File

@@ -74,7 +74,7 @@ void showfile(char *fname)
{
int i, bh = bodylen();
FILE *fp;
char buf[MAXSTRLEN];
char buf[MAXSTRLEN], *result;
bool ateof = FALSE;
statusmsg("FileBrowser: Hit key to continue, Q to quit");
@@ -88,9 +88,9 @@ void showfile(char *fname)
for (i = 0; i < bh - 1 && !ateof; i++)
{
buf[0] = '\0';
fgets(buf, MAXSTRLEN, fp);
result = fgets(buf, MAXSTRLEN, fp);
if (strlen(buf))
if (result && strlen(buf))
bodymsg(buf);
else
ateof = TRUE;