diff --git a/src/lib/ebus/data.cpp b/src/lib/ebus/data.cpp index 7f51947b..76c2828e 100644 --- a/src/lib/ebus/data.cpp +++ b/src/lib/ebus/data.cpp @@ -571,7 +571,7 @@ result_t StringDataField::derive(string name, string comment, bool StringDataField::hasField(const char* fieldName, bool numeric) { - return !numeric && fieldName==m_name; + return !numeric && (fieldName==NULL || fieldName==m_name); } void StringDataField::dump(ostream& output) @@ -841,7 +841,7 @@ bool NumericDataField::hasFullByteOffset(bool after) bool NumericDataField::hasField(const char* fieldName, bool numeric) { - return numeric && fieldName==m_name; + return numeric && (fieldName==NULL || fieldName==m_name); } void NumericDataField::dump(ostream& output) diff --git a/src/lib/ebus/data.h b/src/lib/ebus/data.h index 238fd532..859e726b 100644 --- a/src/lib/ebus/data.h +++ b/src/lib/ebus/data.h @@ -225,7 +225,7 @@ public: /** * Return whether the field is available. - * @param fieldName the name of the field to find. + * @param fieldName the name of the field to find, or NULL for any. * @param numeric true for a numeric field, false for a string field. * @return true if the field is available. */