mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
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
1 changed files with 5 additions and 1 deletions
|
@ -620,11 +620,15 @@ char* rzipstream_gets(rzipstream_t *stream, char *s, size_t len)
|
|||
c = rzipstream_getc(stream);
|
||||
|
||||
/* Check for newline and EOF */
|
||||
if ((c == '\n') || (c == EOF))
|
||||
if (c == EOF)
|
||||
break;
|
||||
|
||||
/* Copy character to string buffer */
|
||||
*str_ptr++ = c;
|
||||
|
||||
/* Check for newline and EOF */
|
||||
if (c == '\n')
|
||||
break;
|
||||
}
|
||||
|
||||
/* Add NUL termination */
|
||||
|
|
Loading…
Add table
Reference in a new issue