|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
-** $Id: lbitlib.c,v 1.15 2010/12/17 13:26:38 roberto Exp roberto $
|
|
|
+** $Id: lbitlib.c,v 1.16 2011/06/20 16:35:23 roberto Exp roberto $
|
|
|
** Standard library for bitwise operations
|
|
|
** See Copyright Notice in lua.h
|
|
|
*/
|
|
@@ -155,7 +155,7 @@ static int fieldargs (lua_State *L, int farg, int *width) {
|
|
|
luaL_argcheck(L, 0 <= f, farg, "field cannot be negative");
|
|
|
luaL_argcheck(L, 0 < w, farg + 1, "width must be positive");
|
|
|
if (f + w > LUA_NBITS)
|
|
|
- luaL_error(L, "trying to access non-existent bits");
|
|
|
+ return luaL_error(L, "trying to access non-existent bits");
|
|
|
*width = w;
|
|
|
return f;
|
|
|
}
|