mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:35:52 +01:00
[PR #714] [MERGED] OLD-7263: restore old upstream PR 7263 - gamedata_blobs: Region 1's lowest cell offset decides where Region 3 starts #753
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#753
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/714
Author: @aslan2142
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:gamedata-spatial-grid-region3📝 Commits (1)
15f30f0gamedata_blobs: Region 1's lowest cell offset decides where Region 3 starts📊 Changes
2 files changed (+85 additions, -2 deletions)
View changed files
📝
tests/test_gamedata_blobs.py(+57 -2)📝
tools/gamedata_blobs.py(+28 -0)📄 Description
Claimed in the coordination issue as: OLD-7263 https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7131834439
Restoration of my original pull request, old upstream PR 7263 in
ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at21625bca8c; the commit applied without conflicts and the code is unchanged; only the commit message changed, citing the old finding's number as plain text.What and why
parse_spatial_grid_blobfound Region 3 as the trailing run of 4-byte-aligned words below the blob size.docs/gamedata.mdlocates Region 3 as the trailing run matchingmin(cell_offs). The run is now only the search range. Region 3 starts at the lowest start in it where Region 1 (which ends at the lowest Region 3 word) has that start as its lowest cell offset.Tested
Linux, Python 3.14, CPU only, synthetic blobs built in the test (no game files):
python -I tests/test_gamedata_blobs.py: on main with only this PR's test changes, 4 of 10 tests error (three colliding-word subtests and the multi-word Region 2 tail). On this branch, all 10 pass.python -m compileall -q tools tests,git diff --checkandpython -I scripts/check_no_game_data.pyon the changed files: clean.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)AI-assisted (Claude Code, Claude Opus 5.5).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.