Context
parse_int_parameter in room/src/doom/m_config.rs parses integer values from .cfg files (used for DEFAULT_INT* and DEFAULT_KEY entries).
C behavior
C ParseIntParameter only checks the lowercase 0x hex prefix. An upper-case 0X is not recognized as hex and falls through to sscanf("%i", ...), which then does recognize it - but the path taken differs.
Rust behavior
The Rust port accepts both 0x and 0X in the dedicated hex branch:
if bytes.len() >= 2 && bytes[0] == b'0' && (bytes[1] == b'x' || bytes[1] == b'X') {
Impact
Likely benign in practice (no known .cfg file uses 0X), but a Rust-port extension that diverges from documented C behavior.
Location
room/src/doom/m_config.rs:635 (flagged with // FIXME:).
Suggested fix
Drop the 0X branch to match C, or document the extension explicitly and add a regression test.
Context
parse_int_parameterinroom/src/doom/m_config.rsparses integer values from.cfgfiles (used forDEFAULT_INT*andDEFAULT_KEYentries).C behavior
C
ParseIntParameteronly checks the lowercase0xhex prefix. An upper-case0Xis not recognized as hex and falls through tosscanf("%i", ...), which then does recognize it - but the path taken differs.Rust behavior
The Rust port accepts both
0xand0Xin the dedicated hex branch:Impact
Likely benign in practice (no known
.cfgfile uses0X), but a Rust-port extension that diverges from documented C behavior.Location
room/src/doom/m_config.rs:635(flagged with// FIXME:).Suggested fix
Drop the
0Xbranch to match C, or document the extension explicitly and add a regression test.