mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
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:
parent
ff22230a73
commit
116079a9ad
4 changed files with 7 additions and 6 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue