Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 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 Merge Risk: 🟡 Moderate · up to Guard the optional boundary handle before merging: a boundary lookup with a null handle can crash when no boundary matches. The inspected boundary-tool caller is unaffected, and blend persistence matches the reader. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change improves containment of failed terrain edits, and the supported saved-map formats match their reader. No new security boundary violation was established. Concurrent access and interruption recovery remain incompletely verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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 |
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.
| } | ||
|
|
||
| (*outNdx) = -1; | ||
| (*outHandle) = -1; |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Check outHandle for null before writing to it.
The header says outHandle can be null: "outNdx must not be null, but outHandle can be." Each match branch checks if (outHandle) before it writes. The new fallback line writes through outHandle with no check. If a caller passes nullptr and no boundary is near, the editor dereferences a null pointer and crashes.
🐛 Proposed fix
(*outNdx) = -1;
- (*outHandle) = -1;
+ if (outHandle) {
+ (*outHandle) = -1;
+ }The early !pt return also resets only outNdx. For consistency, reset outHandle there as well when outHandle is not null.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| (*outHandle) = -1; | |
| if (outHandle) { | |
| (*outHandle) = -1; | |
| } |
Align WorldHeightMapEdit and BorderTool with Zero Hour. Preserve Generals BlendTileData v7 row packing under RETAIL_COMPATIBLE_DATA, adopt the wider in-memory flag rows, and inherit the shared raw-tile accessor.
01c7d68 to
8faff9a
Compare
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 above #3368 and is independent of the boundary-handle fix.
Codex generated the fix and local regression fixtures.