Skip to content

Commit

Permalink
FIX off-by-one in args
Browse files Browse the repository at this point in the history
  • Loading branch information
kikonen committed Nov 20, 2023
1 parent a2bfb13 commit 8e700b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/joint_amotor.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ static int SetMode(lua_State *L)
static int AddTorques(lua_State *L)
{
joint_t joint = checkjoint_amotor(L, 1, NULL);
double torque0 = luaL_optnumber(L, 1, 0);
double torque1 = luaL_optnumber(L, 2, 0);
double torque2 = luaL_optnumber(L, 3, 0);
double torque0 = luaL_optnumber(L, 2, 0);
double torque1 = luaL_optnumber(L, 3, 0);
double torque2 = luaL_optnumber(L, 4, 0);
dJointAddAMotorTorques(joint, torque0, torque1, torque2);
return 0;
}
Expand Down

0 comments on commit 8e700b5

Please sign in to comment.