Skip to content

Evaluate dynamic field lengths once per field - #359

Open
Aschenbath wants to merge 1 commit into
keichi:masterfrom
Aschenbath:fix/oss30-20261124-9130-binary-length-once
Open

Aschenbath wants to merge 1 commit into
keichi:masterfrom
Aschenbath:fix/oss30-20261124-9130-binary-length-once

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

A stateful length callback can currently return one size for a string, buffer, or wrapped field and a different size when advancing the cursor. Arrays also re-evaluate the callback when deriving context indexes. Capture the dynamic length once per field, keeping the consumed data, next field offset, and array $index values consistent.

Validation: added regressions fail on unchanged master. Node suite: 260 passed; Chromium suite: 131 passed, 1 skipped. TypeScript build, full repository formatting check, and type-aware oxlint pass. Tested on Node 24 / Windows.

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