mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-12 08:21:02 +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:
@@ -1505,6 +1505,8 @@ local function buildConfirmModal(imp, m)
|
||||
imp:_confirmModUpdate(c.id, c.release)
|
||||
elseif c.kind == "enableAll" then
|
||||
imp:_setAllMods(true, true)
|
||||
elseif c.kind == "importOversize" then
|
||||
imp:_importSave(c.version, c.source, true)
|
||||
else
|
||||
imp:_toggleMod(c.id, true)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user