Module: sip-router
Branch: master
Commit: 8bb61ea287ccf670ef9cfe990d319249eafbe7c5
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8bb61ea…
Author: Hugh Waite <hugh.waite(a)crocodile-rcs.com>
Committer: Hugh Waite <hugh.waite(a)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 c5229f4..14ea838 100644
--- a/modules/app_lua/app_lua_sr.c
+++ b/modules/app_lua/app_lua_sr.c
@@ -240,7 +240,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)
{
@@ -256,7 +256,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))
{