mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 13:08:20 +00:00
fix handline of sets only containing a zero-length string.
Thank you Robin...
This commit is contained in:
parent
7e46936728
commit
a4ca5b0d82
3 changed files with 8 additions and 3 deletions
|
@ -345,9 +345,10 @@ Value* Ascii::EntryToVal(string s, FieldMapping field)
|
|||
pos++;
|
||||
}
|
||||
|
||||
// test if the string ends with a set_separator... if it does we have to push an zero-lenght
|
||||
// val on top of it.
|
||||
if ( *s.rbegin() == set_separator[0] )
|
||||
// test if the string ends with a set_separator... or if the complete string is
|
||||
// empty.
|
||||
// In either of these cases we have to push an empty val on top of it.
|
||||
if ( s.empty() || *s.rbegin() == set_separator[0] )
|
||||
{
|
||||
lvals[pos] = EntryToVal("", field.subType());
|
||||
if ( lvals[pos] == 0 )
|
||||
|
|
|
@ -7,6 +7,9 @@ testing
|
|||
,
|
||||
testing
|
||||
}, s=[testing, ]],
|
||||
[6] = [s={
|
||||
|
||||
}, s=[]],
|
||||
[1] = [s={
|
||||
testing,testing,testing,
|
||||
}, s=[testing,testing,testing,]],
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
3 ,testing ,testing
|
||||
4 testing, testing,
|
||||
5 ,,, ,,,
|
||||
6
|
||||
@TEST-END-FILE
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue