Repair a defect reading ADIF fields

The search for field names in a record erroneously matches field names
ending in but not exactly matching the specified field name.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8596 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2018-04-01 21:46:18 +00:00
parent 45c9412996
commit 1226416f81

View File

@ -20,7 +20,7 @@ void ADIF::init(QString const& filename)
QString ADIF::extractField(QString const& record, QString const& fieldName) const QString ADIF::extractField(QString const& record, QString const& fieldName) const
{ {
int fieldNameIndex = record.indexOf (fieldName + ':', 0, Qt::CaseInsensitive); int fieldNameIndex = record.indexOf ('<' + fieldName + ':', 0, Qt::CaseInsensitive);
if (fieldNameIndex >=0) if (fieldNameIndex >=0)
{ {
int closingBracketIndex = record.indexOf('>',fieldNameIndex); int closingBracketIndex = record.indexOf('>',fieldNameIndex);