mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-20 19:18:41 +00:00
radio_dataset_value returned the first widget whose on state or /PCOn equalled the selected state. With states /0 /1 and /PCOn items 1 2, selecting /1 matched the first widget's /PCOn "1" and wrote 1 instead of 2, and strip_xfa's comparison, which uses the same function, could then miss a lost value. The selection is an on-state name, so every widget's state is now compared first and /PCOn only after. Test (fails with the one-pass match restored, writing "1" for /1): the static radio fixture with /PCOn 1 2 writes 1 for /0, 2 for /1, 2 for the item 2, the value itself when nothing matches, and nothing with no selection. This changes the XFA data saved for such groups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv