mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-15 15:51:17 +02:00
Validate save imports by main-data checksum, not raw file size
The SAVE FILES card only accepted saves of exactly 32768 bytes and refused anything else. importToSlot now classifies a non-32768 file by the integrity of its main-data checksum instead: - Oversize + valid checksum -> an emulator RTC footer, so the launcher asks for confirmation, then truncates to 32768 on force. - Oversize + invalid checksum -> rejected. - Undersize + valid checksum -> imports zero-padded; otherwise refused. Adds the "Oversized save file" confirm modal, a new vendor-oracle test built by gen1lib (PKHeX-derived) run as its own Lua 5.4 tier, oversize/ truncated policy tests, and the LUA54 wiring in test.sh. # Conflicts: # src/import/LauncherView.lua
This commit is contained in:
@@ -25,6 +25,7 @@ local GenSave = require("src.save_convert.GenSave")
|
||||
local SaveConvert = {}
|
||||
|
||||
SaveConvert.SAVE_SIZE = GenSave.SAVE_SIZE
|
||||
SaveConvert.mainChecksumValid = GenSave.mainChecksumValid
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
-- Crosswalk data loading (cached). Mirrors src/core/Data.lua: prefer
|
||||
|
||||
Reference in New Issue
Block a user