AP_OSD: fix warnings

This commit is contained in:
Alexander Malishev 2018-06-30 00:40:55 +04:00 committed by Andrew Tridgell
parent 9b687e0e50
commit c0db1a3625

View File

@ -220,8 +220,8 @@ void AP_OSD_Screen::draw_message(uint8_t x, uint8_t y)
int16_t end_position = start_position + message_visible_width; int16_t end_position = start_position + message_visible_width;
//ensure array boundaries //ensure array boundaries
start_position = MIN(start_position, sizeof(buffer)-1); start_position = MIN(start_position, int(sizeof(buffer)-1));
end_position = MIN(end_position, sizeof(buffer)-1); end_position = MIN(end_position, int(sizeof(buffer)-1));
//trim invisible part //trim invisible part
buffer[end_position] = 0; buffer[end_position] = 0;