mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 18:09:58 -04:00
cfg.c default_number, which cfg_int and cfg_double use for a set value that does not parse, read cfg_meta(name)->def without a check, so a key without a row whose value was set and unparsable crashed there (the verifier's probe: a segmentation fault inside default_number). gfx_present.c gfx_cfg_window_size did the same for WINDOW_SIZE. Neither is reachable today: every unguarded value read has a row (tests/cfg_rows_check.py holds it so), the three guarded ones use cfg_bool, and WINDOW_SIZE has a row. default_number gives 0 for a key without a row; gfx_cfg_window_size falls back to 1920x1080 when the row or its default is missing. Taking the device profile's default there (1280x800 on a Steam Deck) would change what players get and is left for approval. Reproduced before the change with the new case in tests/cfg_parse_check.py (cfg_int and cfg_double of an unset row's key set to "abc" crashed the program); with the change both give 0 and the check passes, as do the cfg rows checks and the compile checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6.1 KiB
6.1 KiB