andersfylling / andersfylling/uci

Incorrect parsing when specifying multiple subcommands

Aberta
#1 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
C++
Estrelas
3
Forks
1
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

When parsing the UCI command `go wtime 8153 btime 8080 winc 80 binc 80`, the output is `{"wtime": "8153 btime 8080 winc 80 binc 80"}`, instead of `{"binc": "80", "btime": "8080", "winc": "80", "wtime": "8153"}`.

Looking at [`Parser.cpp`](https://github.com/andersfylling/uci/blob/master/uci_code/src/Parser.cpp), we see that the parser doesn't support multiple subcommands, since it doesn't exit the `while (request >> nextWord)` loop until the entire line has been exhausted.

This is not caught by the unit tests, since it never tests the case of multiple subcommands, however this is a necessary feature for compatibility with UCI GUIs.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.