Skip to content

Commit

Permalink
fixed a bug in parsing uci options, apparently i should pay more atte…
Browse files Browse the repository at this point in the history
…ntion when reading the specification xD
  • Loading branch information
philipplenk committed Nov 25, 2020
1 parent 3676593 commit fcc76e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/philchess/uci/types.hpp
Expand Up @@ -122,6 +122,14 @@ namespace uci
inline std::istream& operator>>(std::istream& in, option& opt)
{
std::string line;

in>>line; //skip 'name'
if(line!="name")
{
in.setstate(std::ios_base::failbit);
return in;
}

std::getline(in,line);

constexpr std::string_view value_sep=" value ";
Expand Down

0 comments on commit fcc76e3

Please sign in to comment.