Skip to content

Commit d2ac15c

Browse files
committed
Fixes filestream_vscanf regression
1 parent b70b0de commit d2ac15c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libretro-common/streams/file_stream.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ int filestream_vscanf(RFILE *stream, const char* format, va_list *args)
221221
va_list args_copy;
222222
const char *bufiter = buf;
223223
int ret = 0;
224-
int64_t startpos = 0;
224+
int64_t startpos = filestream_tell(stream);
225225
int64_t maxlen = filestream_read(stream, buf, sizeof(buf)-1);
226226

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

332332
va_end(args_copy);
333-
startpos = filestream_tell(stream);
334333
filestream_seek(stream, startpos + (bufiter - buf),
335334
RETRO_VFS_SEEK_POSITION_START);
336335

0 commit comments

Comments
 (0)