fix afgets
This commit is contained in:
parent
d6a9e35d0b
commit
273f150c84
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user