Open Arnavion opened 7 months ago
The code is casting *mut MQTTReasonCodes -> i32 instead of the intended MQTTReasonCodes -> i32
*mut MQTTReasonCodes -> i32
MQTTReasonCodes -> i32
https://github.com/eclipse/paho.mqtt.rust/blob/cf953b937eaa66c436e746dcfde98d2bf61b36ac/src/server_response.rs#L208
-qosv.push(rsp.alt.sub.reasonCodes.add(i) as i32); +qosv.push(*rsp.alt.sub.reasonCodes.add(i) as i32);
https://github.com/eclipse/paho.mqtt.rust/blob/cf953b937eaa66c436e746dcfde98d2bf61b36ac/src/server_response.rs#L227
-qosv.push(rsp.alt.unsub.reasonCodes.add(i) as i32); +qosv.push(*rsp.alt.unsub.reasonCodes.add(i) as i32);
The code is casting
*mut MQTTReasonCodes -> i32
instead of the intendedMQTTReasonCodes -> i32
https://github.com/eclipse/paho.mqtt.rust/blob/cf953b937eaa66c436e746dcfde98d2bf61b36ac/src/server_response.rs#L208
https://github.com/eclipse/paho.mqtt.rust/blob/cf953b937eaa66c436e746dcfde98d2bf61b36ac/src/server_response.rs#L227