diff --git a/client/variablefieldswidget.cpp b/client/variablefieldswidget.cpp index b4f1ad5..56d2a7c 100644 --- a/client/variablefieldswidget.cpp +++ b/client/variablefieldswidget.cpp @@ -338,7 +338,7 @@ void VariableFieldsWidget::loadProtocolFields( field->clear(); field->addItem("Custom"); - for (int i = 0; i < protocol->frameFieldCount(); i++) { + for (int i = 0; i < protocol->fieldCount(); i++) { if (!protocol->fieldFlags(i).testFlag(AbstractProtocol::FrameField)) continue; QString name = protocol->fieldData(i, AbstractProtocol::FieldName) diff --git a/common/abstractprotocol.cpp b/common/abstractprotocol.cpp index d3583fa..40d8219 100644 --- a/common/abstractprotocol.cpp +++ b/common/abstractprotocol.cpp @@ -361,7 +361,8 @@ int AbstractProtocol::fieldFrameBitOffset(int index, int streamIndex) const { int ofs = 0; - if ((index < 0) || (index >= frameFieldCount())) + if ((index < 0) || (index >= fieldCount()) + || !fieldFlags(index).testFlag(FrameField)) return -1; // Lookup Cache; if not available calculate and cache (if enabled)