rzipstream_gets: Fix missing eol (#14311)
The eol was always stripped from the data, leading to behavior differences with filestream_gets and general read line implementations.
This commit is contained in:
parent
4c4bec11f7
commit
d62b866237
|
@ -620,11 +620,15 @@ char* rzipstream_gets(rzipstream_t *stream, char *s, size_t len)
|
||||||
c = rzipstream_getc(stream);
|
c = rzipstream_getc(stream);
|
||||||
|
|
||||||
/* Check for newline and EOF */
|
/* Check for newline and EOF */
|
||||||
if ((c == '\n') || (c == EOF))
|
if (c == EOF)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Copy character to string buffer */
|
/* Copy character to string buffer */
|
||||||
*str_ptr++ = c;
|
*str_ptr++ = c;
|
||||||
|
|
||||||
|
/* Check for newline and EOF */
|
||||||
|
if (c == '\n')
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add NUL termination */
|
/* Add NUL termination */
|
||||||
|
|
Loading…
Reference in New Issue