Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review. WalkthroughThe changes update height-map flag-row sizing, BlendTileData serialization, blend allocation handling, and boundary selection. They also remove ChangesHeight-Map Editing
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix
|
| Check name | Status | Explanation |
|---|---|---|
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Title check | ✅ Passed | The title clearly summarizes the main change: rolling back failed blend allocations. |
| Description check | ✅ Passed | The description explains the blend-allocation failure, the rollback fix, its application to both game copies, and reported validation. |
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
e6d72ec to
01c7d68
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: ec896c24-cf3c-4218-bd92-4499ae1811e7
📒 Files selected for processing (4)
Generals/Code/Tools/WorldBuilder/include/WHeightMapEdit.hGenerals/Code/Tools/WorldBuilder/src/BorderTool.cppGenerals/Code/Tools/WorldBuilder/src/WHeightMapEdit.cppGeneralsMD/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
01c7d68 to
8faff9a
Compare
| } | ||
|
|
||
| (*outNdx) = -1; | ||
| (*outHandle) = -1; |
There was a problem hiding this comment.
🟠 High src/WHeightMapEdit.cpp:3452
When no boundary is near and outHandle is null, findBoundaryNear dereferences it and crashes instead of returning -1 through outNdx. Guard this cleanup assignment with if (outHandle), as done for successful matches.
🤖 Copy this AI Prompt to have your agent fix this:
In file @Generals/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp around line 3452:
When no boundary is near and `outHandle` is null, `findBoundaryNear` dereferences it and crashes instead of returning `-1` through `outNdx`. Guard this cleanup assignment with `if (outHandle)`, as done for successful matches.
There was a problem hiding this comment.
There was a problem hiding this comment.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
|
| else if (motion == -1) | ||
| { | ||
| // add a boundary | ||
| m_addingNewBorder = true; | ||
|
|
||
| ICoord2D initialBoundary = { 1, 1 }; | ||
| pDoc->addBoundary(&initialBoundary); |
There was a problem hiding this comment.
|
This needs a rebase. |
8faff9a to
1b87fd5
Compare
1b87fd5 to
62e8815
Compare
Rebased |
Applies the same fix to the Generals and Zero Hour copies of
WHeightMapEdit.cppin their existing directories.A three-way terrain blend can require both a secondary blend record and a flipped primary copy. If the secondary consumes the last available slot, the primary allocation fails and the current code stores
-1as the cell’s primary blend index.Obtain both required records before changing the cell indices or cliff mapping. If the primary allocation fails, restore the previous blend-table count to reclaim any secondary record created by the failed attempt.
Existing records remain reusable when the table is full, and capacity warnings are preserved.
Validation:
This branch contains one fix commit directly above main and is independent of the boundary-handle fix in #3383.
Codex generated the fix and local regression fixtures.