mirror of https://github.com/rusefi/lua.git
error handling in 'wrap' does not coerce numbers into string messages
This commit is contained in:
parent
82a8e06524
commit
fdd7209688
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lcorolib.c,v 1.8 2014/10/25 11:50:46 roberto Exp roberto $
|
||||
** $Id: lcorolib.c,v 1.9 2014/11/02 19:19:04 roberto Exp roberto $
|
||||
** Coroutine Library
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -75,7 +75,7 @@ static int luaB_auxwrap (lua_State *L) {
|
|||
lua_State *co = lua_tothread(L, lua_upvalueindex(1));
|
||||
int r = auxresume(L, co, lua_gettop(L));
|
||||
if (r < 0) {
|
||||
if (lua_isstring(L, -1)) { /* error object is a string? */
|
||||
if (lua_type(L, -1) == LUA_TSTRING) { /* error object is a string? */
|
||||
luaL_where(L, 1); /* add extra info */
|
||||
lua_insert(L, -2);
|
||||
lua_concat(L, 2);
|
||||
|
|
Loading…
Reference in New Issue