mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_OSD: fix warnings
This commit is contained in:
parent
9b687e0e50
commit
c0db1a3625
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user