Make parsing of booleans a little bit more lenient.

This makes the input framework (and everything else that uses the Ascii
parser) accept 0 and 1 as valid values for booleans.
This commit is contained in:
Johanna Amann 2018-01-18 11:09:12 -08:00
parent ff22230a73
commit 116079a9ad
4 changed files with 7 additions and 6 deletions

View file

@ -227,9 +227,9 @@ threading::Value* Ascii::ParseValue(const string& s, const string& name, TypeTag
}
case TYPE_BOOL:
if ( s == "T" )
if ( s == "T" || s == "1" )
val->val.int_val = 1;
else if ( s == "F" )
else if ( s == "F" || s == "0" )
val->val.int_val = 0;
else
{