fix(ini): retain nested parse error details - #323
Conversation
Preserve existing INI exceptions through outer parsing handlers and log numeric conversion failures without changing accepted values or recovery. Related to #297 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: fbraz3/GeneralsX/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughINI loading now preserves nested ChangesINI diagnostics
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: 🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Nested errors keep their name, Comment |
|
@coderabbitai please resolve conflicts |
|
🤖 Completed: Resolve merge conflicts in PR #323 — View commit |
Resolved conflicts in: - docs/WORKLOG/2026-09-DIARY.md (unmerged) Co-authored-by: CodeRabbit <noreply@coderabbit.ai> CodeRabbit-Task-Id: 84f7a3b0-781b-4b0e-a248-2736b719b63b
A bad value inside a nested INI module should be reported at that field, not
replaced by the outer
Object ...header. That loss of context has made #297much harder to investigate.
This keeps an existing
INIExceptionwhen it passes through the module andtop-level block handlers. Numeric
std::from_charsfailures also print thetoken and conversion reason to stderr, so release builds retain that clue.
File cleanup and the original failure path remain intact.
There is no clamping, ignored-field behavior, parsing fallback, or change to
accepted values. The shared implementation covers both game variants.
The supplied Shockwave files contain oversized
SpawnReplaceDelayandRecenterTimevalues that exceed the signed 64-bit intermediate used by theLinux parser. Those are confirmed rejection points, but we have not established
which field fails first in the full mod. The originally suspected W3D fields
are already implemented.
Related to #297. This improves diagnostics; it does not fix or close the
Shockwave compatibility issue. The separate vanilla-startup fix in #308 is
still relevant for the reporter's current Flatpak setup. The pending #321
parseBitString8and recoil changes address different paths.Validation
exception header reproduced the baseline's lost context, then exercised the
corrected nested exception propagation with ASan and UBSan.
from_charsandsscanfpaths, including valid numbers,+prefixes, the
-1sentinel, numeric suffix behavior and cleanup.INI.cppusing the generated macOS compilerconfigurations for Generals and Zero Hour.
git diff --checkpasses.No full Shockwave run, retail overflow-behavior comparison, or installed-game
changes are claimed.
Summary by CodeRabbit
Bug Fixes
Documentation