small bug in 'luaV_concat' (L->top was left incorrect in some cases)

This commit is contained in:
Roberto Ierusalimschy
2009-05-27 14:11:27 -03:00
parent 139d562861
commit 57f8414de1
4 changed files with 28 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lobject.c,v 2.28 2008/01/30 18:05:23 roberto Exp roberto $
** $Id: lobject.c,v 2.29 2009/02/19 17:18:25 roberto Exp $
** Some generic functions over Lua objects
** See Copyright Notice in lua.h
*/
@@ -162,8 +162,7 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
fmt = e+2;
}
pushstr(L, fmt);
luaV_concat(L, n+1, cast_int(L->top - L->base) - 1);
L->top -= n;
luaV_concat(L, n+1);
return svalue(L->top - 1);
}