lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 88866208f079b5ece7b7a1ea899a4d354c7695db
parent 7d365a5c7ab01d3d4d2694c88b20e4d908619901
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon,  6 Sep 1999 10:12:41 -0300

`luaL_arg_check' always has an `extramsg'.

Diffstat:
Mlauxlib.c | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lauxlib.c b/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.17 1999/03/11 18:59:19 roberto Exp roberto $ +** $Id: lauxlib.c,v 1.18 1999/08/16 20:52:00 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -35,11 +35,8 @@ void luaL_argerror (int numarg, const char *extramsg) { numarg -= lua_nups(f); if (funcname == NULL) funcname = "?"; - if (extramsg == NULL) - luaL_verror("bad argument #%d to function `%.50s'", numarg, funcname); - else - luaL_verror("bad argument #%d to function `%.50s' (%.100s)", - numarg, funcname, extramsg); + luaL_verror("bad argument #%d to function `%.50s' (%.100s)", + numarg, funcname, extramsg); } const char *luaL_check_lstr (int numArg, long *len) {