Skip to content

bugfix(worldbuilder): Reject lossy retail cliff saves - #3454

Draft
OmarAglan wants to merge 1 commit into
TheSuperHackers:mainfrom
OmarAglan:bugfix/worldbuilder-retail-cliff-save
Draft

OmarAglan wants to merge 1 commit into
TheSuperHackers:mainfrom
OmarAglan:bugfix/worldbuilder-retail-cliff-save

bugfix(worldbuilder): Reject lossy retail cliff saves

8e4430b
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Correctness Check succeeded Oct 9, 2026 in 2m 0s

No issues identified (8 code objects reviewed).

• Merge Base: 2119cc9
• Head: 8e4430b
• Detection Mode: Budget (Learn more)

Details

✅ File Path U3 Bytes Comments Posted Reason
✅ Generals/Code/Tools/WorldBuilder/include/WHeightMapEdit.h 272 0
✅ GeneralsMD/Code/Tools/WorldBuilder/include/WHeightMapEdit.h 272 0
✅ Generals/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp 616 0
✅ Generals/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp 751 0
✅ GeneralsMD/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp 616 0
✅ GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp 751 0

Billed Total: 10.00KB of diff | $0.25 (This review was charged at our per-review byte minimum of 10.00KB. Learn more here)

Filtered Issues Details

Generals/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp
  • line 669: The new save gate relies on canSaveCliffState(), but that check only examines the first omitted cliff-state byte in each row. Retail v7 writes only (m_width + 1) / 8 bytes while the in-memory row can contain multiple omitted bytes; a nonzero flag in any later omitted byte therefore passes this gate and is silently discarded by saveToFile(). Saving such a map still loses cliff state despite the rejection intended here. [ Out of scope (triage) ]
GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilderDoc.cpp
  • line 725: The new save gate relies on canSaveCliffState(), but that check only examines the first omitted cliff-state byte in each row. Retail v7 writes only (m_width + 1) / 8 bytes while the in-memory row can contain multiple omitted bytes; a nonzero flag in any later omitted byte therefore passes this gate and is silently discarded by saveToFile(). Saving such a map still loses cliff state despite the rejection intended here. [ Out of scope (triage) ]