diff --git a/libraries/AP_OSD/AP_OSD_Screen.cpp b/libraries/AP_OSD/AP_OSD_Screen.cpp index 489f8ae922..0843f11643 100644 --- a/libraries/AP_OSD/AP_OSD_Screen.cpp +++ b/libraries/AP_OSD/AP_OSD_Screen.cpp @@ -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; //ensure array boundaries - start_position = MIN(start_position, sizeof(buffer)-1); - end_position = MIN(end_position, sizeof(buffer)-1); + start_position = MIN(start_position, int(sizeof(buffer)-1)); + end_position = MIN(end_position, int(sizeof(buffer)-1)); //trim invisible part buffer[end_position] = 0;