}
// Ignore end-of-line comments
- if (line[0] == _T('%') || line[0] == _T(';') || line[0] == _T('#'))
+ if ( !line.empty() && (line[0] == _T('%') || line[0] == _T(';') || line[0] == _T('#')))
{
- line = wxEmptyString;
+ line.clear();
}
}
val << line[0];
line = line.substr(1);
}
- if (line[0] == '"')
+ if (!line.empty() && line[0] == '"')
line = line.substr(1);
return val;