Index: bropipe.cc =================================================================== --- bropipe.cc (revision 6644) +++ bropipe.cc (working copy) @@ -185,10 +185,9 @@ int num_tokens = 0; char delim = '\0'; - for ( unsigned int i = 0; i < str.length(); ++i ) - { + for ( unsigned int i = 0; i < str.length(); ++i ) { while ( isspace(str[i]) ) - ++i; + ++i; string next_arg; @@ -463,8 +462,11 @@ tokens.clear(); // make sure that the vector is clear tokenize(inText[j].c_str(), tokens); - - if ( (ev = bro_event_new(tokens[0].c_str())) ) + // if this line didn't tokenize to anything, skip the rest of the block + if ( tokens.size() == 0) + continue; + + if ( ev = bro_event_new(tokens[0].c_str()) ) { for ( unsigned int i = 1; i < tokens.size(); ++i ) { @@ -530,10 +532,10 @@ { int bbool=0; - if ( tkn_data == "T" || - tkn_data == "TRUE" || - tkn_data == "1" ) - bbool = 1; + if ( tkn_data.c_str() == "T" || + tkn_data.c_str() == "TRUE" || + tkn_data.c_str() == "1" ) + bbool = 1; bro_event_add_val(ev, BRO_TYPE_BOOL, NULL, &bbool); }