mirror of
https://github.com/jankae/LibreVNA.git
synced 2025-12-06 07:12:10 +01:00
increase robustness of option line parsing
This commit is contained in:
parent
8db7f003ee
commit
d30d444bc7
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue