Skip to content

obs-util: accept C hexadecimal prefixes in config integers - #1532

Merged
zackees merged 3 commits into
masterfrom
fix/1531-config-hex-prefix
Oct 20, 2026
Merged

zackees merged 3 commits into
masterfrom
fix/1531-config-hex-prefix

Conversation

@zackees

@zackees zackees commented Oct 20, 2026

Copy link
Copy Markdown
Member

Configuration values such as 0x0X2a and 0x-0x2a return zero instead of matching C integer parsing.

Configuration integer values accept the optional hexadecimal prefix after the sign, matching C.

Split fix from #1462. Fixes #1531.

Validation: soldr cargo test -p obs-util hex_integer_prefix_after_config_prefix -- --test-threads=1 fails on RED 47078c86e and passes with the fix. Related tests: soldr cargo test -p obs-util config_file_parity -- --test-threads=1.

35-443df62b6b9bf26c29e9ff6f8be2fe29fe4371285a5096fb0bcb4cf5ef6a5078
soldr:   this soldr:     soldr-0.9.34-8f7d9d9201cf86a218c7ee26c68e773e12b3ca9b149c8f7749cf1e3641df10ab
soldr: the broker is a stable singleton and is never replaced automatically; work continues through it and a matching daemon generation is launched behind it.
soldr: to retire it deliberately, run: soldr broker remove
# t0=1792517587.382
    0.14    Compiling obs-util v0.1.0 (/home/niteris/.clud/worktrees/obs-studio-wt-ten-rust/rust/obs-util)
    2.49     Finished `test` profile [unoptimized] target(s) in 2.48s
    2.49      Running unittests src/lib.rs (target/debug/deps/obs_util-b3e4d39ca78ab961)

running 9 tests
test tests::config::config_file_parity::dtostr_exponent_round_trips ... ok
test tests::config::config_file_parity::dtostr_values ... ok
test tests::config::config_file_parity::hex_integer_prefix_after_config_prefix ... ok
test tests::config::config_file_parity::open_missing_file_matches ... ok
test tests::config::config_file_parity::open_string_null_succeeds_both ... ok
test tests::config::config_file_parity::parity_defaults ...     2.53 soldr[cache] obs_util [NC]
ok
test tests::config::config_file_parity::parity_open_mutate_save ... ok
test tests::config::config_file_parity::parity_open_string ... ok
test tests::config::config_file_parity::save_safe_bad_ext_matches ...     4.16 error: config_save_safe: invalid temporary extension specified
ok

test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 660 filtered out; finished in 1.67s

soldr: cache 72 HIT, 7 MISS (91% hit rate, saved 33.6s)

PR CI supplies lint and Tier 2 validation. No public headers or existing C tests changed. Tier 4 does not apply to these utility APIs.

@zackees
zackees enabled auto-merge October 20, 2026 17:33
@zackees
zackees added this pull request to the merge queue Oct 20, 2026
Merged via the queue into master with commit b7f672e Oct 20, 2026
23 checks passed
@zackees
zackees deleted the fix/1531-config-hex-prefix branch October 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: obs-util: accept C hexadecimal prefixes in config integers

1 participant