chore: Update ReadWritePreconditions for empty data but loaded file

This commit is contained in:
scawful
2024-08-14 19:55:57 -04:00
parent 1234510d29
commit 97dda2bfd9
2 changed files with 14 additions and 10 deletions

View File

@@ -208,11 +208,6 @@ absl::Status Rom::LoadZelda3() {
constexpr size_t baseROMSize = 1048576; // 1MB
constexpr size_t headerSize = 0x200; // 512 bytes
if (size_ % baseROMSize == headerSize) {
has_header_ = true;
}
// Remove header if present
if (has_header_) {
auto header =
std::vector<uchar>(rom_data_.begin(), rom_data_.begin() + 0x200);
rom_data_.erase(rom_data_.begin(), rom_data_.begin() + 0x200);