From c1565c16edc487f32d87d1742a7c8e76d0b10236 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 13 Aug 2008 14:02:12 -0300 Subject: small bug: lua_resume returning LUA_YIELD is not an error --- ltests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index a7882ed9..9d58ed2d 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.52 2008/06/23 16:50:34 roberto Exp roberto $ +** $Id: ltests.c,v 2.53 2008/06/26 19:42:45 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -1072,7 +1072,7 @@ static int coresume (lua_State *L) { lua_State *co = lua_tothread(L, 1); luaL_argcheck(L, co, 1, "coroutine expected"); status = lua_resume(co, 0); - if (status != 0) { + if (status != LUA_OK && status != LUA_YIELD) { lua_pushboolean(L, 0); lua_insert(L, -2); return 2; /* return false + error message */ -- cgit v1.2.3-55-g6feb