Feature (contd.): Variable Fields - fixed 2nd protocol of combo protocols not being listed and offset/mask not being calculated correctly for them via the GUI
This commit is contained in:
parent
6bb64a3b26
commit
022fac534c
@ -338,7 +338,7 @@ void VariableFieldsWidget::loadProtocolFields(
|
|||||||
field->clear();
|
field->clear();
|
||||||
|
|
||||||
field->addItem("Custom");
|
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))
|
if (!protocol->fieldFlags(i).testFlag(AbstractProtocol::FrameField))
|
||||||
continue;
|
continue;
|
||||||
QString name = protocol->fieldData(i, AbstractProtocol::FieldName)
|
QString name = protocol->fieldData(i, AbstractProtocol::FieldName)
|
||||||
|
@ -361,7 +361,8 @@ int AbstractProtocol::fieldFrameBitOffset(int index, int streamIndex) const
|
|||||||
{
|
{
|
||||||
int ofs = 0;
|
int ofs = 0;
|
||||||
|
|
||||||
if ((index < 0) || (index >= frameFieldCount()))
|
if ((index < 0) || (index >= fieldCount())
|
||||||
|
|| !fieldFlags(index).testFlag(FrameField))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// Lookup Cache; if not available calculate and cache (if enabled)
|
// Lookup Cache; if not available calculate and cache (if enabled)
|
||||||
|
Loading…
Reference in New Issue
Block a user