From df40ed6ea445c4f83a4afc38718f4acc85f313d5 Mon Sep 17 00:00:00 2001 From: emoose Date: Thu, 26 Dec 2019 05:22:10 +0000 Subject: [PATCH] [VFS] Fix STFS file table info being read in wrong endian --- src/xenia/vfs/devices/stfs_container_device.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/vfs/devices/stfs_container_device.cc b/src/xenia/vfs/devices/stfs_container_device.cc index e4fb3bd94..25f588e36 100644 --- a/src/xenia/vfs/devices/stfs_container_device.cc +++ b/src/xenia/vfs/devices/stfs_container_device.cc @@ -648,8 +648,8 @@ bool StfsVolumeDescriptor::Read(const uint8_t* p) { } version = xe::load_and_swap(p + 0x01); flags = xe::load_and_swap(p + 0x02); - file_table_block_count = xe::load_and_swap(p + 0x03); - file_table_block_number = load_uint24_be(p + 0x05); + file_table_block_count = xe::load(p + 0x03); + file_table_block_number = load_uint24_le(p + 0x05); std::memcpy(top_hash_table_hash, p + 0x08, 0x14); total_allocated_block_count = xe::load_and_swap(p + 0x1C); total_unallocated_block_count = xe::load_and_swap(p + 0x20);