fix a bug causing 'logtool filter' to crash on irregular input