From bbec662483b18441eee77d34e0147e02583b3c1b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 25 Sep 2012 07:21:03 +1000 Subject: [PATCH] APM: fixed build warning --- ArduPlane/GCS_Mavlink.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduPlane/GCS_Mavlink.pde b/ArduPlane/GCS_Mavlink.pde index b1d90d20fe..0fc1c89dbc 100644 --- a/ArduPlane/GCS_Mavlink.pde +++ b/ArduPlane/GCS_Mavlink.pde @@ -1920,7 +1920,7 @@ mission_failed: (chan == MAVLINK_COMM_0 && gcs3.initialised)) { mavlink_channel_t out_chan = (mavlink_channel_t)(((uint8_t)chan)^1); // only forward if it would fit in our transmit buffer - if (comm_get_txspace(out_chan) > msg->len + MAVLINK_NUM_NON_PAYLOAD_BYTES) { + if (comm_get_txspace(out_chan) > ((uint16_t)msg->len) + MAVLINK_NUM_NON_PAYLOAD_BYTES) { _mavlink_resend_uart(out_chan, msg); } }