* IEC 61850 client: added missing check in ClientReportControlBlock_getConfRev

pull/265/head
Michael Zillgith 5 years ago
parent ed8c8b3ac7
commit 131fcf5236

@ -201,7 +201,10 @@ ClientReportControlBlock_getConfRev(ClientReportControlBlock self)
int
ClientReportControlBlock_getOptFlds(ClientReportControlBlock self)
{
return (MmsValue_getBitStringAsInteger(self->optFlds) / 2);
if (self->optFlds)
return (MmsValue_getBitStringAsInteger(self->optFlds) / 2);
else
return 0;
}
void

@ -1582,6 +1582,7 @@ ClientReportControlBlock_getConfRev(ClientReportControlBlock self);
* \brief Gets the OptFlds parameter of the RCB (decides what information to include in a report)
*
* \param self the RCB instance
*
* \return bit field representing the optional fields of a report (uses flags from \ref REPORT_OPTIONS)
*/
LIB61850_API int

Loading…
Cancel
Save