Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

IsOptionToken does not treat 0x96 (U+2013) as an option prefix, unlike the game's tokenizer

Open Beginner friendly
#685 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c
Domain
cli

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

backlog

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: tests L'-' and L'+' 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

  1. Test first: -timestep followed by –noconsole has no value.
  2. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EchoTools/nevr-runtime

All issues in EchoTools/nevr-runtime

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.