Browse code

app_lua_sr: fixed confition on number of parameters for xavp get

Daniel-Constantin Mierla authored on 24/01/2022 12:55:55
Showing 1 changed files
... ...
@@ -1466,7 +1466,7 @@ static int lua_sr_xavp_get(lua_State *L)
1466 1466
 
1467 1467
 	env_L = _app_lua_api.env_get_f();
1468 1468
 	num_param = lua_gettop(L);
1469
-	if(num_param<2 && num_param>3)
1469
+	if(num_param<2 || num_param>3)
1470 1470
 	{
1471 1471
 		LM_ERR("wrong number of parameters [%d]\n", num_param);
1472 1472
 		return 0;
... ...
@@ -1615,4 +1615,4 @@ void lua_sr_core_openlibs(lua_State *L)
1615 1615
 	luaL_openlib(L, "sr.hdr",  _sr_hdr_Map,  0);
1616 1616
 	luaL_openlib(L, "sr.pv",   _sr_pv_Map,   0);
1617 1617
 	luaL_openlib(L, "sr.xavp", _sr_xavp_Map, 0);
1618
-}
1619 1618
\ No newline at end of file
1619
+}