From: Miquel G. <gbm...@gm...> - 2010-11-09 23:10:15
|
--- Origin800Parser.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Origin800Parser.cpp b/Origin800Parser.cpp index 374e0a3..3181a9b 100644 --- a/Origin800Parser.cpp +++ b/Origin800Parser.cpp @@ -844,7 +844,9 @@ void Origin800Parser::readColumnInfo(int spread, int i) LOG_PRINT(logfile, " Column %s\n", colName.c_str()) unsigned int pos = findStringPos(colName); - if (file.eof()) + // even if colName was not found we are not yet at eof, + // just before it. We cannot use file.eof() + if (!(pos < d_file_size)) return; file.seekg(pos - 1, ios_base::beg); -- 1.7.3 |