From 6b0b3b1a050065ba60aca4c4cc71639195e25b57 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 1 Nov 2022 08:32:12 +1100 Subject: [PATCH] AP_Scripting: treat zero loops as 1 --- .../examples/Aerobatics/Trajectory/plane_aerobatics.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Scripting/examples/Aerobatics/Trajectory/plane_aerobatics.lua b/libraries/AP_Scripting/examples/Aerobatics/Trajectory/plane_aerobatics.lua index 71d313ce80..d0af50b3db 100644 --- a/libraries/AP_Scripting/examples/Aerobatics/Trajectory/plane_aerobatics.lua +++ b/libraries/AP_Scripting/examples/Aerobatics/Trajectory/plane_aerobatics.lua @@ -710,7 +710,7 @@ function climbing_circle(radius, height, bank_angle, arg4) end function loop(radius, bank_angle, num_loops, arg4) - if not num_loops then + if not num_loops or num_loops <= 0 then num_loops = 1 end return make_paths("loop", {