mirror of
https://gitlab.com/80486DX2-66/gists
synced 2024-12-26 11:30:03 +05:30
pure_getline.c: do not continue if output
is NULL
This commit is contained in:
parent
514cdf6ee2
commit
43df0e137b
@ -17,6 +17,11 @@ bool pure_getline(char** output) {
|
||||
* false: an error occurred, see errno
|
||||
*/
|
||||
|
||||
if (output == NULL) {
|
||||
errno = EINVAL;
|
||||
return false;
|
||||
}
|
||||
|
||||
char* line = NULL;
|
||||
size_t len = 0;
|
||||
int character;
|
||||
|
Loading…
Reference in New Issue
Block a user