Fix test for EOF on continuation line
getline() returns -1 on EOF, need to not loose that by forcing result to size_t (unsigned). Reported-by: Petr Sabata
This commit is contained in:
parent
e760a19a43
commit
21a85d3bec
|
|
@ -700,7 +700,7 @@ ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
|
|||
while ((cp = strstr(*linep, "\\\n")) != NULL) {
|
||||
char *line1 = NULL;
|
||||
size_t len1 = 0;
|
||||
size_t cc1;
|
||||
ssize_t cc1;
|
||||
|
||||
if ((cc1 = getline(&line1, &len1, in)) < 0) {
|
||||
fprintf(stderr, "Missing continuation line\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue