Skip to content

Raise the default file, CHK and merged chunk size limits to 256 MiB. - #10

Open
2Pacalypse- wants to merge 1 commit into
mainfrom
raise-size-limits
Open

2Pacalypse- wants to merge 1 commit into
mainfrom
raise-size-limits

Conversation

@2Pacalypse-

Copy link
Copy Markdown
Member

Real maps have CHKs well over the old 64 MiB defaults. 랜능크 하제 v2.1.3 is a 5 MB .scx whose scenario.chk is 127,455,624 bytes, and the game plays it fine. With default limits it fails:

Caused by:
    0: Failed to read MPQ
    1: MPQ file bytes limit exceeded: observed 127455624, limit 67108864

ShieldBattery already overrides these three limits to 256 MiB everywhere it parses maps. Raising the defaults means callers no longer have to remember to: one ShieldBattery call site that didn't pass overrides failed to render this map. Decompression bombs are still bounded by the 500:1 sector ratio and the sector/table/chunk count limits; only the absolute size caps move.

broodmap-cli minimap renders the map with the new defaults; cargo test -p broodmap and clippy pass.

This touches the line next to #8's max_chk_chunks_per_tag change, so whichever merges second needs a trivial rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant