mavlink: message buffer size fixed

This commit is contained in:
Anton Babushkin
2014-07-25 14:30:06 +02:00
parent 1938ef16e3
commit 07c4144cde
+1 -1
View File
@@ -1268,7 +1268,7 @@ Mavlink::task_main(int argc, char *argv[])
* make space for two messages plus off-by-one space as we use the empty element
* marker ring buffer approach.
*/
if (OK != message_buffer_init(2 * MAVLINK_MAX_PACKET_LEN + 2)) {
if (OK != message_buffer_init(2 * sizeof(mavlink_message_t) + 1)) {
errx(1, "can't allocate message buffer, exiting");
}