[Emulator] Fixed ZAR loading. Thanks Adrian

This commit is contained in:
Gliniak 2024-03-22 08:28:47 +01:00
parent 5efcc6a71b
commit c9bf44f4f4
1 changed files with 2 additions and 2 deletions

View File

@ -423,7 +423,7 @@ Emulator::FileSignatureType Emulator::GetFileSignature(
}
const uint64_t file_size = std::filesystem::file_size(path);
const uint64_t header_size = 4;
const int64_t header_size = 4;
if (file_size < header_size) {
return FileSignatureType::Unknown;
@ -463,7 +463,7 @@ Emulator::FileSignatureType Emulator::GetFileSignature(
}
file = xe::filesystem::OpenFile(path, "rb");
xe::filesystem::Seek(file, header_size, SEEK_END);
xe::filesystem::Seek(file, -header_size, SEEK_END);
fread_s(file_magic, sizeof(file_magic), 1, header_size, file);
fclose(file);