diff --git a/src/iec61850/inc/iec61850_client.h b/src/iec61850/inc/iec61850_client.h index 95bead9..7377300 100644 --- a/src/iec61850/inc/iec61850_client.h +++ b/src/iec61850/inc/iec61850_client.h @@ -1486,7 +1486,7 @@ IedConnection_getDataDirectoryFC(IedConnection self, IedClientError* error, cons * \brief returns the directory of the given data object/data attribute with the given FC * * Implementation of the GetDataDirectory ACSI service. This will return the list of - * C strings with all data attributes or sub data objects as elements that have the given FX. The returned + * C strings with all data attributes or sub data objects as elements. The returned * strings will contain the functional constraint appended in square brackets when appropriate. * * \param self the connection object diff --git a/src/mms/asn1/ber_integer.c b/src/mms/asn1/ber_integer.c index 2d060ce..d821b29 100644 --- a/src/mms/asn1/ber_integer.c +++ b/src/mms/asn1/ber_integer.c @@ -125,13 +125,20 @@ BerInteger_setUint32(Asn1PrimitiveValue* self, uint32_t value) uint8_t* valueBuffer = (uint8_t*) &valueCopy; uint8_t byteBuffer[5]; - byteBuffer[4] = 0; - int i; - for (i = 0; i < 4; i++) { + +#if (ORDER_LITTLE_ENDIAN == 1) + byteBuffer[4] = 0; + + for (i = 0; i < 4; i++) byteBuffer[i] = valueBuffer[i]; - } +#else + bytebuffer[0] = 0; + + for (i = 0; i < 4; i++) + byteBuffer[i + 1] = valueBuffer[i]; +#endif /* (ORDER_LITTLE_ENDIAN == 1) */ return setIntegerValue(self, byteBuffer, 5); }