From a73ded21535c79a081cae16b12482e3e70441e6c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 7 Jul 2003 10:34:25 -0300 Subject: Move nothing when there is nothing to move --- lapi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lapi.c b/lapi.c index f5deadc8..e3c4b088 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.238 2003/05/09 20:16:54 roberto Exp roberto $ +** $Id: lapi.c,v 1.239 2003/05/14 21:06:56 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -96,6 +96,7 @@ LUA_API int lua_checkstack (lua_State *L, int size) { LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { int i; + if (from == to) return; lua_lock(to); api_checknelems(from, n); from->top -= n; -- cgit v1.2.3-55-g6feb