bool CIniFile::ReadFile(FILE *file) {
string line;
string keyname, valuename, value;
string::size_type pLeft, pRight;
char buff[BUFF_SIZE];
while (fgets(buff, BUFF_SIZE, file)) {
// To be compatible with Win32, check for existence of '\r'.
// Win32 files have the '\r' and Unix files don't at the end of a line.
// Note that the '\r' will be written to INI files from
// Unix so that the created INI file can be read under Win32
// without change.
string line(buff);
if (line[line.length() - 1] == '\n')
line = line.substr(0, line.length() - 1);
if (line[line.length() - 1] == '\r')
line = line.substr(0, line.length() - 1);
When compiled with
-g -O0
since:Can go below the size of the string.
For:
Which is from the optbench Pt Heptamer island..
Should be closed by #86.