Skip to content

[issues-fix] 12 fixes, 2026-09-02 - #281

Merged
evilchinesefood merged 12 commits into
masterfrom
issues-fix/20260902-181612-91395
Sep 3, 2026
Merged

[issues-fix] 12 fixes, 2026-09-02#281
evilchinesefood merged 12 commits into
masterfrom
issues-fix/20260902-181612-91395

Conversation

@evilchinesefood

Copy link
Copy Markdown
Owner

Closes #269: [issues-find] [S2] WeatherChecker returns only the partner result (src/battle_ai_field_statuses.c) (5cb4a3a)
Closes #270: [issues-find] [S2] FieldStatusChecker lets partner veto field setup (src/battle_ai_field_statuses.c) (eb6a1cf)
Closes #273: [issues-find] [S2] CopySaveSlotData indexes sectors by untrusted id (src/save.c) (e2b992f)
Closes #271: [issues-find] [S2] compressTileset treats empty read as success (tools/compresSmol/compressSmolTiles.cpp) (7a9a2b6)
Closes #272: [issues-find] [S2] mapjson drops unknown connections and miscounts (tools/mapjson/mapjson.cpp) (b2cd3f7)
Closes #274: [issues-find] [S2] DoPokedexSearch scans species per list row (src/pokedex.c) (492415d)
Closes #275: [issues-find] [S2] HGSS DoPokedexSearch scans species per row (src/pokedex_plus_hgss.c) (4ec2a77)
Closes #277: [issues-find] [S3] find_func ignores objdump failures (tools/find_func/find_func.py) (4cbe90d)
Closes #278: [issues-find] [S3] Random32 updates RNG with interrupts enabled (src/random.c) (c174209)
Closes #279: [issues-find] [S3] GetEggSpecies walks every species for pre-evos (src/daycare.c) (817924f)
Closes #280: [issues-find] [S3] FindMapsWithMon scans every wild header (src/pokedex_area_screen.c) (f4e3b98)
Closes #268: [issues-find] [S3] GetPokedexRatingText passes species to dex flags (src/birch_pc.c) (3a1b775)

Overlaps open PRs
None

Blocked
None

Deferred
None

Summary

Tier Issues Fixed Blocked Deferred Skipped Not reached
A 12 12 0 0 0 0
B 0 0 0 0 0 0
- 0 0 0 0 0 0
TOTAL 12 12 0 0 0 0

WeatherChecker overwrote the setter's result with the partner, so rain/sun
followed only the partner and a mixed damaging-weather pair refused the move.
Keep the setter's non-neutral result and only take the partner when the setter
is still NEUTRAL. Verified with make modern -j8 (EXIT=0).
FieldStatusChecker overwrote the setter with the partner, so terrains and
Gravity followed only the partner and a NEUTRAL partner vetoed Trick Room.
Keep the setter for mixed non-Trick-Room results and treat NEUTRAL as
Trick Room agreement. Verified with make modern -j8 (EXIT=0).
CopySaveSlotData and GetSaveValidStatus used the flash footer id as an
index into locations[] and as 1 << id with no range check. Skip the
sector when id >= NUM_SECTORS_PER_SLOT. Verified with make modern -j8
(EXIT=0).
compressTileset returned success when the tileset file was missing or empty,
so the tiles compressor wrote a truncated output and exited 0. Mark the
result failed on an empty read and fail output open/write. Verified with
make modern -j8 (EXIT=0).
mapjson skipped missing connection maps but still emitted the original JSON
array length, so the overworld walked past the real list. Count only emitted
connections, skip known region-filtered maps, and fail unknown ids.
Verified with make modern -j8 (EXIT=0).
DoPokedexSearch called NationalPokedexNumToSpecies per list row on each
name, color, and type filter, a linear gSpeciesInfo scan. Store species
on pokedexList when the list is built. Verified with make modern -j8
(EXIT=0).
HGSS DoPokedexSearch called NationalPokedexNumToSpecies per list row on
each name, color, and type filter. Store species on pokedexList when the
list is built, matching the vanilla search. Verified with make modern -j8
(EXIT=0).
find_func.py ignored objdump's exit status and treated empty stdout as a
lookup miss. Run objdump with check=True, print stderr, and exit on
FileNotFoundError or a nonzero objdump status. Verified with make modern
-j8 (EXIT=0).
Random32 updated gRngValue with interrupts enabled, so VBlank
AdvanceRandom could nest and lose an RNG advance. Hold sRngLoopUnlocked
across the update. Verified with make modern -j8 (EXIT=0).
GetEggSpecies scanned every enabled species and its evolution list up to
five times to find predecessors. Walk GetSpeciesPreEvolution instead.
Verified with make modern -j8 (EXIT=0).
FindMapsWithMon walked every gWildMonHeaders entry and filtered by region
after a map-header lookup. Build a first-use RegionMapType index and only
test current-region headers. Verified with make modern -j8 (EXIT=0).
GetPokedexRatingText passed a species id to GetSetPokedexFlag, which
indexes by National Dex number. Pass RegionalToNationalOrder and clamp
the rating table index. Verified with make modern -j8 (EXIT=0).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T23:56:58.049502Z 3a1b775 PR opened
🔒 Security Review Completed 2026-09-02T23:55:50.197727Z 3a1b775 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a1b775ec0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/pokedex_area_screen.c
Comment on lines +310 to +311
if (sWildHeaderRegionIndexReady)
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Rebuild the heap-backed region index after heap resets

After an area page has been viewed once, entering any battle calls MoveSaveBlocks_ResetHeap() from CB2_InitBattle, overwriting and reinitializing gHeap. The static ready flag remains true even though sWildHeadersByRegion was allocated from that heap, so the next area-page visit skips rebuilding the index and reads reclaimed data as header IDs, potentially indexing gWildMonHeaders out of bounds. Store the index outside the resettable heap or invalidate/rebuild it whenever the heap is reset.

Useful? React with 👍 / 👎.

@evilchinesefood
evilchinesefood merged commit 81159f9 into master Sep 3, 2026
6 checks passed
@evilchinesefood
evilchinesefood deleted the issues-fix/20260902-181612-91395 branch September 3, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment