After the parser returns WeaselJson_REJECT once, subsequent calls to WeaselJsonParser_parse (including the final len == 0 EOF call) now keep returning WeaselJson_REJECT instead of potentially reporting OK.
Changes:
Add a rejected flag to Parser3.
Clear the flag in reset().
Check the flag at the start of parse() and immediately return WeaselJson_REJECT.
Set the flag whenever a continuation returns WeaselJson_REJECT.
Add a regression test covering the exact reproduction from issue #12.
Closes #12
After the parser returns `WeaselJson_REJECT` once, subsequent calls to `WeaselJsonParser_parse` (including the final `len == 0` EOF call) now keep returning `WeaselJson_REJECT` instead of potentially reporting `OK`.
Changes:
- Add a `rejected` flag to `Parser3`.
- Clear the flag in `reset()`.
- Check the flag at the start of `parse()` and immediately return `WeaselJson_REJECT`.
- Set the flag whenever a continuation returns `WeaselJson_REJECT`.
- Add a regression test covering the exact reproduction from issue #12.
After the parser returns WeaselJson_REJECT once, subsequent calls to
WeaselJsonParser_parse (including the final len==0 EOF call) must keep
returning WeaselJson_REJECT instead of potentially reporting OK.
- Add a `rejected` flag to Parser3.
- Clear the flag in reset().
- Check the flag at the start of parse() and immediately return REJECT.
- Set the flag whenever a continuation returns REJECT.
Add a test covering the exact reproduction from issue #12.
weaselbot
marked the pull request as ready for review 2026-06-19 17:08:49 +00:00
andrew
merged commit 05185eb3ee into main2026-06-19 17:17:11 +00:00
andrew
deleted branch weaselbot/issue-122026-06-19 17:17:12 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #12
After the parser returns
WeaselJson_REJECTonce, subsequent calls toWeaselJsonParser_parse(including the finallen == 0EOF call) now keep returningWeaselJson_REJECTinstead of potentially reportingOK.Changes:
rejectedflag toParser3.reset().parse()and immediately returnWeaselJson_REJECT.WeaselJson_REJECT.