mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath: fix handline of sets only containing a zero-length string. Conflicts: src/input/readers/Ascii.cc
This commit is contained in:
commit
48c6bdf467
3 changed files with 8 additions and 3 deletions
|
@ -348,9 +348,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-length 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