mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-23 18:06:36 +00:00
Fix to correctly set header.metadata_offset
This fix will correctly set ``header.metadata_offset`` in ``libretrodb_create`` instead of always setting it to zero. The main problem was using ``filestream_seek`` when ``filestream_tell`` should be used to get the actual offset. See issue #10140
This commit is contained in:
parent
385b0b71e7
commit
71c12aab32
@ -173,8 +173,7 @@ int libretrodb_create(RFILE *fd, libretrodb_value_provider value_provider,
|
||||
if ((rv = rmsgpack_dom_write(fd, &sentinal)) < 0)
|
||||
goto clean;
|
||||
|
||||
header.metadata_offset = swap_if_little64(filestream_seek(
|
||||
fd, 0, RETRO_VFS_SEEK_POSITION_CURRENT));
|
||||
header.metadata_offset = swap_if_little64(filestream_tell(fd));
|
||||
md.count = item_count;
|
||||
libretrodb_write_metadata(fd, &md);
|
||||
filestream_seek(fd, root, RETRO_VFS_SEEK_POSITION_START);
|
||||
|
Loading…
x
Reference in New Issue
Block a user