Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various issues w/ setoption #1843

Open
uwuplant opened this issue Feb 9, 2023 · 1 comment
Open

Various issues w/ setoption #1843

uwuplant opened this issue Feb 9, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@uwuplant
Copy link

uwuplant commented Feb 9, 2023

BUG REPORT

Describe the bug
The setoption command does not properly handle multiple name or value arguments.

Steps to Reproduce

  1. Send the command setoption value livelogstats value true
    Expected behavior: Throw an error that no name is given
    Observed behavior: lc0 returns error Flag '--preload' must be either 'true' or 'false'
    Additionally: setoption name a name b returns error Unknown option: ab.
@borg323
Copy link
Member

borg323 commented Jan 21, 2024

Note, the error for setoption name a name b should be error Unknown option: a name b i.e. everything after the first name until the first value should be treated as the option.
Also doing setoption name MaxPrefetch value 1 value 2 is accepted and sets MaxPrefetch to 12, which is obviously bad. There are two reasonable alternatives here, either complain about a bad value 1 value 2 or about a wrong option MaxPrefetch value 1 depending on whether we use the first or last value token as the delimiter. I would prefer using the first value as delimiter to allow using the word value in string options, e.g. as part of a path name with spaces like setoption name LogFile value c:\best value for money\log.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants