SeppPenner / SparkplugNet

SparkplugNet is a library to use the Sparkplug industrial IoT (IIoT) standard in .Net. It uses MQTTnet in the background.
MIT License
83 stars 42 forks source link

Check endianess in conversions. #71

Closed SeppPenner closed 8 months ago

SeppPenner commented 8 months ago

From https://github.com/SeppPenner/SparkplugNet/commit/2c0454f931eaecab051f0cb058a8cff4d58bb6f3#commitcomment-138925118:

Just a note: The BitConverter.Get... and BitConverter.To.. will force the Indianness to the system architecture Indianness (not a problem if that is littleIndian) but in systems using BigIndian the conversion will be done in BigIndian. System.Buffers.Binary.BinaryPrimitives provides methods for explicitly converting to from bytes in the desired Indianness format. (ReadInt32LittleEndian, WriteInt32LittleEndian).

SeppPenner commented 8 months ago

Just a marker for me, currently working on this.

SeppPenner commented 8 months ago

@all-contributors please add @shouidar for tests and code

allcontributors[bot] commented 8 months ago

@SeppPenner

I've put up a pull request to add @shouidar! :tada:

SeppPenner commented 8 months ago

Fixed with https://github.com/SeppPenner/SparkplugNet/releases/tag/1.3.3.