Repository navigation
libobs/util: Drop the closing quote in cf_literal_to_str - #54
Merged
zackees merged 2 commits intoOct 9, 2026
Merged
Conversation
test_cf_lexer pinned cf_literal_to_str keeping the closing quote after
an escape ("a\nb" gave a<LF>b"), characterized, not endorsed. Expect the
literal without its quotes instead, and add two cases that the same
counting bug breaks: an escaped quote right before the closing one, and
text after an explicit count, which the result must not include.
Refs obs-rust#48
Co-Authored-By: Claude Opus 5.5 <[email protected]>
cf_literal_to_str counted down once per loop iteration, but an escape consumes two or more chars in one iteration, so after an escape the loop ran past the closing quote and copied it (and, with an explicit count, whatever followed it) into the result: "a\nb" gave a<LF>b". Stop at the closing quote's position instead. The result never needs more than count bytes: plain chars are copied 1:1 and an escape writes at most one byte for the two or more it consumes. Callers affected: theme string values and metadata (OBSApp_Themes.cpp) and effect annotation strings (effect-parser.c) containing an escape no longer end in a stray quote. GREEN for test_cf_lexer. Refs obs-rust#48 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 9, 2026
zackees
added a commit
to b7216309-jpg/obs-studio
that referenced
this pull request
Oct 10, 2026
Master fixed two C quirks the lexer/cf-tokenizer ports had characterized: strref_cmp_strref/strref_cmpi_strref now return 1 when only the second strref is empty (obs-rust#60), and cf_literal_to_str stops at the closing quote instead of leaking it after an escape (obs-rust#54). Port both and update the Tier 1 expectations; the parity tests against the C oracle now pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=9874c935622b730ed6d379839d9f915d56e798b3 secs=224 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791594138,"gate":"rust/all/fmt","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"a22cae91b0249b5e859a421ca897e8fd","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"471d8b65186d7a73df15372fccf1b3a7","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"4662bfe636941c7c447f693a2a9dfbfbc3a5f774ebeb35beb5b6f1ce1505fe18","lane":"rust-test","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":9,"stamp":"ecf6eb5030963f9c781847ca5d827a4d","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"ef54c86046561303c8f0d16ffbea3153bcc655b71505abadc807552ae804490c","lane":"tier2-linux","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":202,"stamp":"db5686daffeecb4e1a158a5012812ec5","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"}
b7216309-jpg
pushed a commit
to b7216309-jpg/obs-studio
that referenced
this pull request
Oct 10, 2026
Master fixed two C quirks the lexer/cf-tokenizer ports had characterized: strref_cmp_strref/strref_cmpi_strref now return 1 when only the second strref is empty (obs-rust#60), and cf_literal_to_str stops at the closing quote instead of leaking it after an escape (obs-rust#54). Port both and update the Tier 1 expectations; the parity tests against the C oracle now pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=9874c935622b730ed6d379839d9f915d56e798b3 secs=224 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791594138,"gate":"rust/all/fmt","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"a22cae91b0249b5e859a421ca897e8fd","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"471d8b65186d7a73df15372fccf1b3a7","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"4662bfe636941c7c447f693a2a9dfbfbc3a5f774ebeb35beb5b6f1ce1505fe18","lane":"rust-test","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":9,"stamp":"ecf6eb5030963f9c781847ca5d827a4d","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"ef54c86046561303c8f0d16ffbea3153bcc655b71505abadc807552ae804490c","lane":"tier2-linux","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":202,"stamp":"db5686daffeecb4e1a158a5012812ec5","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"}
b7216309-jpg
pushed a commit
to b7216309-jpg/obs-studio
that referenced
this pull request
Oct 10, 2026
Master fixed two C quirks the lexer/cf-tokenizer ports had characterized: strref_cmp_strref/strref_cmpi_strref now return 1 when only the second strref is empty (obs-rust#60), and cf_literal_to_str stops at the closing quote instead of leaking it after an escape (obs-rust#54). Port both and update the Tier 1 expectations; the parity tests against the C oracle now pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=9874c935622b730ed6d379839d9f915d56e798b3 secs=224 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791594138,"gate":"rust/all/fmt","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"a22cae91b0249b5e859a421ca897e8fd","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"471d8b65186d7a73df15372fccf1b3a7","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"4662bfe636941c7c447f693a2a9dfbfbc3a5f774ebeb35beb5b6f1ce1505fe18","lane":"rust-test","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":9,"stamp":"ecf6eb5030963f9c781847ca5d827a4d","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"ef54c86046561303c8f0d16ffbea3153bcc655b71505abadc807552ae804490c","lane":"tier2-linux","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":202,"stamp":"db5686daffeecb4e1a158a5012812ec5","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"}
6 tasks done
zackees
added a commit
to b7216309-jpg/obs-studio
that referenced
this pull request
Oct 10, 2026
Master fixed two C quirks the lexer/cf-tokenizer ports had characterized: strref_cmp_strref/strref_cmpi_strref now return 1 when only the second strref is empty (obs-rust#60), and cf_literal_to_str stops at the closing quote instead of leaking it after an escape (obs-rust#54). Port both and update the Tier 1 expectations; the parity tests against the C oracle now pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=9874c935622b730ed6d379839d9f915d56e798b3 secs=224 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791594138,"gate":"rust/all/fmt","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"a22cae91b0249b5e859a421ca897e8fd","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"471d8b65186d7a73df15372fccf1b3a7","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"4662bfe636941c7c447f693a2a9dfbfbc3a5f774ebeb35beb5b6f1ce1505fe18","lane":"rust-test","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":9,"stamp":"ecf6eb5030963f9c781847ca5d827a4d","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"ef54c86046561303c8f0d16ffbea3153bcc655b71505abadc807552ae804490c","lane":"tier2-linux","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":202,"stamp":"db5686daffeecb4e1a158a5012812ec5","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"}
zackees
added a commit
to b7216309-jpg/obs-studio
that referenced
this pull request
Oct 10, 2026
Master fixed two C quirks the lexer/cf-tokenizer ports had characterized: strref_cmp_strref/strref_cmpi_strref now return 1 when only the second strref is empty (obs-rust#60), and cf_literal_to_str stops at the closing quote instead of leaking it after an escape (obs-rust#54). Port both and update the Tier 1 expectations; the parity tests against the C oracle now pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=9874c935622b730ed6d379839d9f915d56e798b3 secs=224 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791594138,"gate":"rust/all/fmt","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"a22cae91b0249b5e859a421ca897e8fd","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"471d8b65186d7a73df15372fccf1b3a7","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"4662bfe636941c7c447f693a2a9dfbfbc3a5f774ebeb35beb5b6f1ce1505fe18","lane":"rust-test","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":9,"stamp":"ecf6eb5030963f9c781847ca5d827a4d","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"ef54c86046561303c8f0d16ffbea3153bcc655b71505abadc807552ae804490c","lane":"tier2-linux","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":202,"stamp":"db5686daffeecb4e1a158a5012812ec5","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"}
zackees
added a commit
to b7216309-jpg/obs-studio
that referenced
this pull request
Oct 10, 2026
Master fixed two C quirks the lexer/cf-tokenizer ports had characterized: strref_cmp_strref/strref_cmpi_strref now return 1 when only the second strref is empty (obs-rust#60), and cf_literal_to_str stops at the closing quote instead of leaking it after an escape (obs-rust#54). Port both and update the Tier 1 expectations; the parity tests against the C oracle now pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=9874c935622b730ed6d379839d9f915d56e798b3 secs=224 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791594138,"gate":"rust/all/fmt","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"a22cae91b0249b5e859a421ca897e8fd","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"471d8b65186d7a73df15372fccf1b3a7","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"4662bfe636941c7c447f693a2a9dfbfbc3a5f774ebeb35beb5b6f1ce1505fe18","lane":"rust-test","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":9,"stamp":"ecf6eb5030963f9c781847ca5d827a4d","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"ef54c86046561303c8f0d16ffbea3153bcc655b71505abadc807552ae804490c","lane":"tier2-linux","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":202,"stamp":"db5686daffeecb4e1a158a5012812ec5","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"}
zackees
added a commit
to b7216309-jpg/obs-studio
that referenced
this pull request
Oct 10, 2026
Master fixed two C quirks the lexer/cf-tokenizer ports had characterized: strref_cmp_strref/strref_cmpi_strref now return 1 when only the second strref is empty (obs-rust#60), and cf_literal_to_str stops at the closing quote instead of leaking it after an escape (obs-rust#54). Port both and update the Tier 1 expectations; the parity tests against the C oracle now pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=9874c935622b730ed6d379839d9f915d56e798b3 secs=224 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791594138,"gate":"rust/all/fmt","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"a22cae91b0249b5e859a421ca897e8fd","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"ac36a3c1acd427fb1911ead460f0f8b178efbcd860f29200095c0fceacb3d5af","lane":"lint","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":13,"stamp":"471d8b65186d7a73df15372fccf1b3a7","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"4662bfe636941c7c447f693a2a9dfbfbc3a5f774ebeb35beb5b6f1ce1505fe18","lane":"rust-test","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":9,"stamp":"ecf6eb5030963f9c781847ca5d827a4d","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"} Ci-Attestation: {"at":1791594138,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"ef54c86046561303c8f0d16ffbea3153bcc655b71505abadc807552ae804490c","lane":"tier2-linux","parents":["6cee7a166df292724082d88354bef9dd5885b736"],"secs":202,"stamp":"db5686daffeecb4e1a158a5012812ec5","tree":"9874c935622b730ed6d379839d9f915d56e798b3","v":1,"via":"run"}
zackees
added a commit
to b7216309-jpg/obs-studio
that referenced
this pull request
Oct 10, 2026
Master fixed two C quirks the lexer/cf-tokenizer ports had characterized: strref_cmp_strref/strref_cmpi_strref now return 1 when only the second strref is empty (obs-rust#60), and cf_literal_to_str stops at the closing quote instead of leaking it after an escape (obs-rust#54). Port both and update the Tier 1 expectations; the parity tests against the C oracle now pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=b9700f40fdf2c959859b23729ac355aac18f8611 secs=94 lanes=lint:run,rust-test:run,tier2-linux:run Ci-Attestation: {"at":1791659811,"gate":"rust/all/fmt","host":"linux-x86_64","key":"80b41cabc2b99754af82351b24464077a0f2c3b5e8e0435931a367feff4ba543","lane":"lint","parents":["24c28c018467ba0a96fa769c9dad315b93364ee6"],"secs":21,"stamp":"e78152623289d105c70f3f12be5fbaa3","tree":"b9700f40fdf2c959859b23729ac355aac18f8611","v":1,"via":"run"} Ci-Attestation: {"at":1791659811,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"80b41cabc2b99754af82351b24464077a0f2c3b5e8e0435931a367feff4ba543","lane":"lint","parents":["24c28c018467ba0a96fa769c9dad315b93364ee6"],"secs":21,"stamp":"b968c0775d5f1beddcf661bf919941da","tree":"b9700f40fdf2c959859b23729ac355aac18f8611","v":1,"via":"run"} Ci-Attestation: {"at":1791659811,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"caf8e4acd1f26e9c504c4828ce9275052454638ab4735c03c11aba9d7e9b72f2","lane":"rust-test","parents":["24c28c018467ba0a96fa769c9dad315b93364ee6"],"secs":21,"stamp":"709942d4b526e2d335967e90ca1a2d42","tree":"b9700f40fdf2c959859b23729ac355aac18f8611","v":1,"via":"run"} Ci-Attestation: {"at":1791659811,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"127862c3824d34ae1b11b28ac0aa24185302d5538923458e438655efe47de3ef","lane":"tier2-linux","parents":["24c28c018467ba0a96fa769c9dad315b93364ee6"],"secs":52,"stamp":"cb6ddd2624a4bf11e4728568e684301c","tree":"b9700f40fdf2c959859b23729ac355aac18f8611","v":1,"via":"run"}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #48 (the
cf_literal_to_strhalf; thestrref_cmp_strrefhalf stays documented, see my comment there)Refs #43
This is the C fix proposed in #48. Feel free to close it if you'd rather keep the quirk. The PR has a RED commit, then the fix; there is no Rust.
Bug
cf_literal_to_strcounted down its remaining length once per loop iteration, but an escape consumes two or more characters in a single iteration. After any escape, the loop therefore ran past the closing quote and copied it into the result. With an explicitcount, it could also copy whatever followed the literal."a\nb"a⏎b"a⏎b"\t"⇥"⇥"a\""a""a"'\x41'zz',count6A'zzAWho sees it: theme files (
OBSApp_Themes.cpp, for theme metadata and string variables) and effect annotation strings (effect-parser.c). Any of those values that contains an escape currently ends with a stray quote.Fix
Loop until the closing quote's position (
literal + count, after the existing--count) instead of counting iterations. Thebzalloc(count)buffer is still always large enough: plain characters are copied 1:1, and an escape writes at most one byte for the two or more it consumes. Nothing else changes: invalid literals still return NULL, and the escape handling (cf_convert_from_escape_literal) is untouched.Tests
test_cf_lexer.c: the two pinned "characterized, not endorsed" assertions now expect the literal without its quote, as #48 allows. I also added the two other cases from the table (escaped quote before the closing one; text after an explicitcount).Verification
cf_literal_to_strverbatim fromcf-lexer.cwith MSVC into a scratch harness with all 12literal_to_strcases. Before the fix the 8 unchanged cases pass and the 4 escape cases fail with the stray quote; after it, 12/12 pass../lintpasses.Rust port
#49 (cf-tokenizer port) currently reproduces the old behavior and says so. If this merges, I'll update it to the fixed semantics. Its Tier 3 oracle compiles this C, so parity will require it.
🤖 Generated with Claude Code