open-dis / open-dis-cpp

C++ implementation of the IEEE-1278.1 Distributed Interactive Simulation (DIS) application protocol v6 and v7
BSD 2-Clause "Simplified" License
91 stars 66 forks source link

IFFPdu bug on SystemIdentifier.h and SystemIdentifier.cpp #65

Closed CarlosSprekelsen closed 2 years ago

CarlosSprekelsen commented 2 years ago

I tried to implement the IFFPdu, but it failed to form a correct stream. I managed to identify the issue with the code. Under SystemIdentifier _systemMode shall be 8-bit, but it is defined as a unsigned short (16bit). The correct declaration should be :

unsigned char _systemMode;

and corresponding gets and sets should change accordingly.

leif81 commented 2 years ago

Thanks for the report @CarlosSprekelsen

Would you like to submit a pull request with the fix? I can review and merge.