[sr-dev] git:4.0: modules/app_lua: Fix off-by-one error in modf
Hugh Waite
hugh.waite at crocodile-rcs.com
Thu Sep 19 00:34:14 CEST 2013
Module: sip-router
Branch: 4.0
Commit: 84b21f2e9f602032d5950069cbd1dbf3ac416fcb
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=84b21f2e9f602032d5950069cbd1dbf3ac416fcb
Author: Hugh Waite <hugh.waite at crocodile-rcs.com>
Committer: Hugh Waite <hugh.waite at crocodile-rcs.com>
Date: Wed Sep 18 21:58:12 2013 +0100
modules/app_lua: Fix off-by-one error in modf
- Fixes calling sr.modf with additional parameters
---
modules/app_lua/app_lua_sr.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/app_lua/app_lua_sr.c b/modules/app_lua/app_lua_sr.c
index 21a9c18..c01db86 100644
--- a/modules/app_lua/app_lua_sr.c
+++ b/modules/app_lua/app_lua_sr.c
@@ -239,7 +239,7 @@ static int lua_sr_modf (lua_State *L)
goto error;
}
} else {
- for(i=1; i<=argc; i++)
+ for(i=1; i<argc; i++)
{
if(expf->fixup(&(act->val[i+1].u.data), i)<0)
{
@@ -255,7 +255,7 @@ static int lua_sr_modf (lua_State *L)
/* free fixups */
if (expf->fixup) {
- for(i=1; i<=argc; i++)
+ for(i=1; i<argc; i++)
{
if ((act->val[i+1].type == MODFIXUP_ST) && (act->val[i+1].u.data))
{
More information about the sr-dev
mailing list