elua: simplified source

This commit is contained in:
Daniel Kolesa 2014-05-07 10:09:52 +01:00 committed by Daniel Kolesa
parent b71231d93d
commit 23c27f06c5
1 changed files with 1 additions and 4 deletions

View File

@ -226,7 +226,7 @@ static int elua_exec(lua_State *L) {
} }
#else #else
char *buf, *cptr; char *buf, *cptr;
size_t buflen = 0; size_t buflen = 1;
int i; int i;
STARTUPINFO si; STARTUPINFO si;
@ -237,9 +237,6 @@ static int elua_exec(lua_State *L) {
for (i = 1; i < lua_gettop(L); ++i) { for (i = 1; i < lua_gettop(L); ++i) {
buflen += lua_objlen(L, i + 1) + 2; buflen += lua_objlen(L, i + 1) + 2;
if (i != (lua_gettop(L) - 1)) {
buflen += 1;
}
} }
buf = alloca(buflen + 1); buf = alloca(buflen + 1);