From: tsteven4 Date: Thu, 27 Dec 2018 18:38:34 +0000 (-0700) Subject: fix up style file OFIELD option processing. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~8^2~57^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f1b6e44af115274f4524d7a94b9d6cb71b81c689;p=gpsbabel.git fix up style file OFIELD option processing. --- diff --git a/xcsv.cc b/xcsv.cc index 6b3e140a1..b1ec2b06e 100644 --- a/xcsv.cc +++ b/xcsv.cc @@ -333,8 +333,10 @@ xcsv_parse_style_line(QString line) // This is pretty lazy way to parse write options. // They've very rarely used, so we'll go for simple. - if (tokens.size() > 4) { - QString options_string = tokens[3].simplified(); + // We may have split the optional fourth and final field which can contain + // option[s], so look at all the remaining tokens. + for (int token_idx = 3; token_idx < tokens.size(); ++token_idx) { + QString options_string = tokens[token_idx].simplified(); if (options_string.contains("no_delim_before")) { options |= OPTIONS_NODELIM; }