Changeset 3521


Ignore:
Timestamp:
2002-11-08T14:26:17+13:00 (21 years ago)
Author:
jrm21
Message:

subtle bug fix where if a line ended with a space then the following line
would be appended to it, possibly causing parsing problems. Eg

indexes document:text
defaultindex document:text

If "indexes" ended with a space, then "defaultindex" is the name of an
index, not a separate entry!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/cfgread.cpp

    r3425 r3521  
    163163    values.push_back(curvalue);
    164164    break;
     165      } else {
     166    // swallow up the EOL chars
     167    while (!filein.eof() && (c=='\r' || c=='\n')) filein.get(c);
    165168      }
    166169    } else { // no new line seen
     
    170173    curvalue.clear();
    171174
    172     //  the record continues on the next line
    173     // remove whitespace before next token
    174     while (!filein.eof() && isspace(c)) filein.get(c);
     175    // remove whitespace (but not newline/CR chars) before next token
     176    while (!filein.eof() && (c==' ' || c=='\t')) filein.get(c);
    175177
    176178  } // while(1)
Note: See TracChangeset for help on using the changeset viewer.