mirror of
https://gitlab.com/80486DX2-66/gists
synced 2025-01-14 13:12:05 +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
|
* false: an error occurred, see errno
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (output == NULL) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
char* line = NULL;
|
char* line = NULL;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
int character;
|
int character;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user