mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-28 07:08:40 -05:00
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:
parent
45c9412996
commit
1226416f81
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user