From 5b78ba1fe46faf96bf40814e81b3d4164b5e460c Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 14 Jun 2007 17:33:50 +0000 Subject: Fixing segfault in LuaTask. --- lib/LuaTask.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/LuaTask.cc b/lib/LuaTask.cc index 3dcabdc..e38c136 100644 --- a/lib/LuaTask.cc +++ b/lib/LuaTask.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: LuaTask.cc,v 1.12 2007-06-14 14:12:03 pixel Exp $ */ +/* $Id: LuaTask.cc,v 1.13 2007-06-14 17:33:50 pixel Exp $ */ #include #include @@ -144,7 +144,7 @@ int LuaTask::Do() throw (GeneralException) { cmd = L->tostring(2).strdup(); - args = (char **) malloc(sizeof(char *) * (L->gettop() - 1)); + args = (char **) malloc(sizeof(char *) * (L->gettop())); args[0] = cmd; for (i = 3; i <= L->gettop(); i++) { args[i - 2] = L->tostring(i).strdup(); -- cgit v1.2.3