make reading ascii logfiles work when the input separator is different from \t.

(Wrong escape character was used for reading header fields).
This commit is contained in:
Bernhard Amann 2012-07-23 11:27:08 -07:00
parent f2e60a76a8
commit 336990e234
2 changed files with 3 additions and 3 deletions

View file

@ -144,7 +144,7 @@ bool Ascii::ReadHeader(bool useCached)
pos++; pos++;
} }
//printf("Updating fields from description %s\n", line.c_str()); // printf("Updating fields from description %s\n", line.c_str());
columnMap.clear(); columnMap.clear();
for ( int i = 0; i < NumFields(); i++ ) for ( int i = 0; i < NumFields(); i++ )
@ -199,7 +199,7 @@ bool Ascii::GetLine(string& str)
if ( str[0] != '#' ) if ( str[0] != '#' )
return true; return true;
if ( str.compare(0,8, "#fields\t") == 0 ) if ( ( str.compare(0,7, "#fields") == 0 ) && ( str[7] == separator[0] ) )
{ {
str = str.substr(8); str = str.substr(8);
return true; return true;