From 738b3b64afd6b06d1de6d71caae9a3122c74a5a5 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 20 Mar 2014 16:36:02 -0300 Subject: detail (to avoid warnings with '-O3') --- lutf8lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lutf8lib.c b/lutf8lib.c index bc3c7158..def7e869 100644 --- a/lutf8lib.c +++ b/lutf8lib.c @@ -1,5 +1,5 @@ /* -** $Id: lutf8lib.c,v 1.2 2014/02/06 20:03:24 roberto Exp roberto $ +** $Id: lutf8lib.c,v 1.3 2014/03/20 14:11:00 roberto Exp roberto $ ** Standard library for UTF-8 manipulation ** See Copyright Notice in lua.h */ @@ -108,7 +108,7 @@ static int codepoint (lua_State *L) { int code; s = utf8_decode(s, &code); if (s == NULL) - luaL_error(L, "invalid UTF-8 code"); + return luaL_error(L, "invalid UTF-8 code"); lua_pushinteger(L, code); n++; } @@ -200,7 +200,7 @@ static int iter_aux (lua_State *L) { int code; const char *next = utf8_decode(s + n, &code); if (next == NULL || iscont(next)) - luaL_error(L, "invalid UTF-8 code"); + return luaL_error(L, "invalid UTF-8 code"); lua_pushinteger(L, n + 1); lua_pushinteger(L, code); return 2; -- cgit v1.2.3-55-g6feb