Commit 50599678 authored by Volker Krause's avatar Volker Krause
Browse files

Fix name-based lookup of 1154UT vendor block elements

parent aeaf49ba
......@@ -119,11 +119,11 @@ Vendor1154UTSubBlock Vendor1154UTBlock::firstBlock() const
return Vendor1154UTSubBlock(m_block, 0);
}
Vendor1154UTSubBlock Vendor1154UTBlock::findSubBlock(const char id[3]) const
Vendor1154UTSubBlock Vendor1154UTBlock::findSubBlock(const char id[SubBlockTypeSize]) const
{
auto sblock = firstBlock();
while (!sblock.isNull()) {
if (strncmp(sblock.id(), id, 3) == 0) {
if (strncmp(sblock.id(), id, SubBlockTypeSize) == 0) {
return sblock;
}
sblock = sblock.nextBlock();
......
......@@ -52,7 +52,7 @@ public:
/** First S-block, for iterating. */
Vendor1154UTSubBlock firstBlock() const;
/** Finds a S-block by type. */
Vendor1154UTSubBlock findSubBlock(const char id[3]) const;
Vendor1154UTSubBlock findSubBlock(const char id[2]) const;
Q_INVOKABLE QVariant findSubBlock(const QString &str) const;
static constexpr const char RecordId[] = "1154UT";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment