mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Proximity: fix possible overflow/truncation issue
This commit is contained in:
parent
5282ed3a1b
commit
5af02dde59
@ -285,7 +285,7 @@ bool AP_Proximity_LightWareSF40C::send_request_for_distance()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// prepare request
|
// prepare request
|
||||||
char request_str[15];
|
char request_str[16];
|
||||||
snprintf(request_str, sizeof(request_str), "?TS,%d,%d\r\n", (int)(_sector_width_deg[_last_sector]), (int)(_sector_middle_deg[_last_sector]));
|
snprintf(request_str, sizeof(request_str), "?TS,%d,%d\r\n", (int)(_sector_width_deg[_last_sector]), (int)(_sector_middle_deg[_last_sector]));
|
||||||
uart->write(request_str);
|
uart->write(request_str);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user