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:
Robin Sommer 2012-08-27 12:27:24 -07:00
commit 48c6bdf467
3 changed files with 8 additions and 3 deletions

View file

@ -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 )

View file

@ -7,6 +7,9 @@ testing
,
testing
}, s=[testing, ]],
[6] = [s={
}, s=[]],
[1] = [s={
testing,testing,testing,
}, s=[testing,testing,testing,]],

View file

@ -13,6 +13,7 @@
3 ,testing ,testing
4 testing, testing,
5 ,,, ,,,
6
@TEST-END-FILE