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++;
|
pos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test if the string ends with a set_separator. If it does
|
// Test if the string ends with a set_separator... or if the
|
||||||
// we have to push an zero-length val on top of it.
|
// complete string is empty. In either of these cases we have
|
||||||
if ( *s.rbegin() == set_separator[0] )
|
// to push an empty val on top of it.
|
||||||
|
if ( s.empty() || *s.rbegin() == set_separator[0] )
|
||||||
{
|
{
|
||||||
lvals[pos] = EntryToVal("", field.subType());
|
lvals[pos] = EntryToVal("", field.subType());
|
||||||
if ( lvals[pos] == 0 )
|
if ( lvals[pos] == 0 )
|
||||||
|
|
|
@ -7,6 +7,9 @@ testing
|
||||||
,
|
,
|
||||||
testing
|
testing
|
||||||
}, s=[testing, ]],
|
}, s=[testing, ]],
|
||||||
|
[6] = [s={
|
||||||
|
|
||||||
|
}, s=[]],
|
||||||
[1] = [s={
|
[1] = [s={
|
||||||
testing,testing,testing,
|
testing,testing,testing,
|
||||||
}, s=[testing,testing,testing,]],
|
}, s=[testing,testing,testing,]],
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
3 ,testing ,testing
|
3 ,testing ,testing
|
||||||
4 testing, testing,
|
4 testing, testing,
|
||||||
5 ,,, ,,,
|
5 ,,, ,,,
|
||||||
|
6
|
||||||
@TEST-END-FILE
|
@TEST-END-FILE
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue