pjde / delphi-mqtt

MQTT server and client components for Delphi
147 stars 82 forks source link

Unsubscribe ACK only uses 1 byte for identifying messages #18

Open TheOdd0ne2 opened 7 months ago

TheOdd0ne2 commented 7 months ago

Row 584 and 585 in uMQTT.pas:

ReadByte (FRxStream);
id := ReadByte (FRxStream);

Should be replaced by: id := ReadByte (FRxStream) * $100 + ReadByte (FRxStream);

otherwise Message ID (anID) will have 1 byte masked off when Message ID surpass 256.