fix afgets

This commit is contained in:
Connor Lane Smith 2011-05-25 20:45:01 +01:00
parent d6a9e35d0b
commit 273f150c84
1 changed files with 1 additions and 1 deletions

View File

@ -20,5 +20,5 @@ afgets(char **p, size_t *size, FILE *fp)
if(buf[n-1] == '\n' || feof(fp))
break;
}
return *p;
return (len > 0) ? *p : NULL;
}