diff options
| author | syfyra <258908070+syfyra@users.noreply.github.com> | 2026-11-26 17:52:05 +0100 |
|---|---|---|
| committer | syfyra <258908070+syfyra@users.noreply.github.com> | 2026-11-26 17:52:05 +0100 |
| commit | 4f1ca189643e738bf7b4c72a557f49d474fadc5d (patch) | |
| tree | 08a4aa1ec03135cc9481659fd76ca09e64a4385e /runtime/test/code_hooks_test.cpp | |
| parent | d5634defe4030ec12558f70492fd7322ddaf5873 (diff) | |
rbf0_encode: write back a short-count element with text or child content (RBF0-ENCODE-SHORT-COUNT-CONTENT)
docs/rbf0.md 9.6: an element short of its attribute count is refused
only when it has a value in its content, because that value would
decode as an attribute. rbf0_tree also sets attribute_order_violation
when text or a child element arrives before the count is reached, and
the encoder refused every flagged element as "an attribute after
content", so such an element was refused although its bytes write back
exactly (an element short of its count with no content already encoded,
as tested).
Refuse on the flag only when an attribute record's offset follows the
first content record's, or when records carry no offsets to tell (a
hand-built tree fails closed as before). The short-count check for a
value in the content is unchanged.
Tested: test_fewer_attribute_records_than_the_count now also encodes a
short-count element with text and with a child element exactly (both
refused before) and refuses them once the offsets are removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/code_hooks_test.cpp')
0 files changed, 0 insertions, 0 deletions