IsOptionToken does not treat 0x96 (U+2013) as an option prefix, unlike the game's tokenizer
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start with src/core/cli_option_value.h and the existing IsOptionToken tests; compare its prefix checks with the tokenizer rule in src/runtime/lifecycle/cmdline_strip.h:15. Add a test for -timestep followed by –noconsole, then update IsOptionToken to recognize U+2013. Done when the token is not consumed as the value and the relevant unit tests pass.
Written by the indexing model from the issue text.
Description
nevr_cli::IsOptionToken (src/core/cli_option_value.h, added by #684) treats only '-' and '+' as option prefixes. src/runtime/lifecycle/cmdline_strip.h:15 says the game's tokenizer also treats 0x96 (the ANSI en dash) as one. After CommandLineToArgvW that character arrives as U+2013, so a value option followed by an en-dash-prefixed token (-timestep –noconsole) still takes that token as its value.
Evidence at 1d2ed4b4
src/runtime/lifecycle/cmdline_strip.h:15: "a token is an option when it starts with '-', '+' or 0x96 and the next character is not a digit".src/core/cli_option_value.h,IsOptionToken: testsL'-'andL'+'only.
Not shown
Whether the game's own parser then sees the same token as an option on the wide command line, and whether any real command line contains U+2013 (a pasted en dash).
Falsifier
nevr_cli::OptionValue returns nullptr for a token starting with L'–' in a unit test and the game treats such a token as an option.
Work
- Test first:
-timestepfollowed by–noconsolehas no value. - Add U+2013 to
IsOptionToken.
Low priority.
- Dominant language
- C
- Stars
- 2
- Forks
- 3
- Avg merge
- 9h 46m
- Merged PRs (30d)
- 368
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EchoTools/nevr-runtime
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#713 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EchoTools/nevr-runtime#698 ·
Maintainers usually reply within 1 day
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
EchoTools/nevr-runtime#665 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
EchoTools/nevr-runtime#651 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
EchoTools/nevr-runtime#623 ·
Maintainers usually reply within 1 day
All issues in EchoTools/nevr-runtime
Similar issues
-
area:docs kind:docs-drift
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
InauguralSystems/EigenScript#1887 ·
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
type-bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
zephyrproject-rtos/zephyr#122906 ·
Maintainers usually reply within 2 days
-
feat(palindrome): add C solutionPossibly taken @aadiitya2007 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
techcsispit/code-corner#58 · 1 comment ·
Maintainers usually reply within 1 day