Skip to content

Commit

Permalink
Fixes filestream_vscanf regression
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Mar 15, 2023
1 parent b70b0de commit d2ac15c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libretro-common/streams/file_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ int filestream_vscanf(RFILE *stream, const char* format, va_list *args)
va_list args_copy;
const char *bufiter = buf;
int ret = 0;
int64_t startpos = 0;
int64_t startpos = filestream_tell(stream);
int64_t maxlen = filestream_read(stream, buf, sizeof(buf)-1);

if (maxlen <= 0)
Expand Down Expand Up @@ -330,7 +330,6 @@ int filestream_vscanf(RFILE *stream, const char* format, va_list *args)
}

va_end(args_copy);
startpos = filestream_tell(stream);
filestream_seek(stream, startpos + (bufiter - buf),
RETRO_VFS_SEEK_POSITION_START);

Expand Down

0 comments on commit d2ac15c

Please sign in to comment.