mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Scripting: unint32: remove integer range check
This commit is contained in:
parent
b031f88e3c
commit
b399ed3044
@ -20,7 +20,7 @@ uint32_t coerce_to_uint32_t(lua_State *L, int arg) {
|
|||||||
|
|
||||||
int success;
|
int success;
|
||||||
const lua_Integer v = lua_tointegerx(L, arg, &success);
|
const lua_Integer v = lua_tointegerx(L, arg, &success);
|
||||||
if (success && v >= 0) {
|
if (success) {
|
||||||
return static_cast<uint32_t>(v);
|
return static_cast<uint32_t>(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user