added 'return' to calls to 'luaL_error' (to signal to the compiler

that the function cannot continue past that call)
This commit is contained in:
Roberto Ierusalimschy
2017-03-14 09:40:44 -03:00
parent f5f3df3bd1
commit 1a1b2f3d7f
3 changed files with 11 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lutf8lib.c,v 1.15 2015/03/28 19:16:55 roberto Exp roberto $
** $Id: lutf8lib.c,v 1.16 2016/12/22 13:08:50 roberto Exp roberto $
** Standard library for UTF-8 manipulation
** See Copyright Notice in lua.h
*/
@@ -171,7 +171,7 @@ static int byteoffset (lua_State *L) {
}
else {
if (iscont(s + posi))
luaL_error(L, "initial position is a continuation byte");
return luaL_error(L, "initial position is a continuation byte");
if (n < 0) {
while (n < 0 && posi > 0) { /* move back */
do { /* find beginning of previous character */