increase robustness of option line parsing

This commit is contained in:
Jan Käberich 2022-12-08 14:19:20 +01:00
parent 8db7f003ee
commit d30d444bc7

View File

@ -184,11 +184,10 @@ Touchstone Touchstone::fromFile(string filename)
option_line_found = true; option_line_found = true;
transform(line.begin(), line.end(), line.begin(), ::toupper); transform(line.begin(), line.end(), line.begin(), ::toupper);
// check individual options // check individual options
line.erase(0,1);
istringstream iss(line); istringstream iss(line);
bool last_R = false; bool last_R = false;
string s; string s;
// throw away the option line start character
iss >> s;
for(;iss>>s;) { for(;iss>>s;) {
if(last_R) { if(last_R) {
last_R = false; last_R = false;