S7NetPlus / s7netplus

S7.NET+ -- A .NET library to connect to Siemens Step7 devices
MIT License
1.3k stars 581 forks source link

ReadStructAsync has a problem that i can not put bool in the last of struct #386

Closed mabc666 closed 3 years ago

mabc666 commented 3 years ago

I put some bool in the last of struct and it also have a lot of other type in the front of that bool. It causes exception IndexOutOfRangeException

mabc666 commented 3 years ago

Beause GetStructSize return a round up size of the struct