浏览代码

extra argument for "assert"

Roberto Ierusalimschy 28 年之前
父节点
当前提交
b291e50006
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lbuiltin.c

+ 2 - 2
lbuiltin.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lbuiltin.c,v 1.8 1997/11/19 17:29:23 roberto Exp roberto $
+** $Id: lbuiltin.c,v 1.9 1997/11/26 18:53:45 roberto Exp roberto $
 ** Built-in functions
 ** See Copyright Notice in lua.h
 */
@@ -213,7 +213,7 @@ static void luaI_assert (void)
 {
   lua_Object p = lua_getparam(1);
   if (p == LUA_NOOBJECT || lua_isnil(p))
-    lua_error("assertion failed!");
+    luaL_verror("assertion failed!  %.100s", luaL_opt_string(2, ""));
 }