We currently fail on an option with a sapece in the name,
as example
setoption name Clear Hash
returns error message "Option Clear not found". This
patch fixes this off-by-one type bug.
Thanks to Joona for spotting this.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
if (token == "name")
{
uip >> name;
- uip >> token;
- while (!uip.eof() && token != "value")
+ while (!uip.eof())
{
- name += (" " + token);
- uip >> token;
+ uip >> token;
+ if (token == "value")
+ break;
+
+ name += (" " + token);
}
if (token == "value")
{