Skip to content

Fix XML get_field_from_array index increment and write() indent forwarding - #800

Open
clockblocker wants to merge 1 commit into
munich-data-engineering:mainfrom
clockblocker:fix-xml-array-and-indent
Open

clockblocker wants to merge 1 commit into
munich-data-engineering:mainfrom
clockblocker:fix-xml-array-and-indent

Conversation

@clockblocker

Copy link
Copy Markdown
Contributor

Summary

Fixes two small bugs in rfl::xml:

  1. rfl::xml::Reader::get_field_from_array never incremented i in its sibling loop, so any _idx > 0 scanned all siblings and always returned an out-of-bounds error (also fixes the "of of bounds." typo in the error message).
  2. rfl::xml::write(obj, _indent) ignored _indent when forwarding to the std::ostream& overload.

Verification

  • Built with Ninja (-Wall -Werror) and ran all XML tests via ctest, including new regression tests in tests/xml/test_array_and_indent_fix.cpp.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant