2
Vote

Possible Bug in CommonPacket.cs

description

In the Expand member function of the CommonPacket class ( around line 235 in CommonPacket.cs ), a new CommonPacketItem is expanded from the incoming byte array, however nothing is ever done with this object reference. I believe the following line should call AddItem(cpi);

eg:
            if (count > 2)
            {
                for (int i = 2; i < count; i++)
                {
                    Offset += 1;
                    CommonPacketItem cpi = new CommonPacketItem();
                    cpi.Expand(DataArray, Offset, out Offset);
                    // Add this:
                    AddItem(cpi);
                }
            }

comments