aboutsummaryrefslogtreecommitdiff
path: root/lutf8lib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-03-14 09:40:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-03-14 09:40:44 -0300
commit1a1b2f3d7f321dd6f28118c985986940b189c635 (patch)
tree14cffeb82724b5673ded4e9a3c5bde7f53e065d3 /lutf8lib.c
parentf5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9 (diff)
downloadlua-1a1b2f3d7f321dd6f28118c985986940b189c635.tar.gz
lua-1a1b2f3d7f321dd6f28118c985986940b189c635.tar.bz2
lua-1a1b2f3d7f321dd6f28118c985986940b189c635.zip
added 'return' to calls to 'luaL_error' (to signal to the compiler
that the function cannot continue past that call)
Diffstat (limited to 'lutf8lib.c')
-rw-r--r--lutf8lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lutf8lib.c b/lutf8lib.c
index 6db6fd37..57bd59e0 100644
--- a/lutf8lib.c
+++ b/lutf8lib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lutf8lib.c,v 1.15 2015/03/28 19:16:55 roberto Exp roberto $ 2** $Id: lutf8lib.c,v 1.16 2016/12/22 13:08:50 roberto Exp roberto $
3** Standard library for UTF-8 manipulation 3** Standard library for UTF-8 manipulation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -171,7 +171,7 @@ static int byteoffset (lua_State *L) {
171 } 171 }
172 else { 172 else {
173 if (iscont(s + posi)) 173 if (iscont(s + posi))
174 luaL_error(L, "initial position is a continuation byte"); 174 return luaL_error(L, "initial position is a continuation byte");
175 if (n < 0) { 175 if (n < 0) {
176 while (n < 0 && posi > 0) { /* move back */ 176 while (n < 0 && posi > 0) { /* move back */
177 do { /* find beginning of previous character */ 177 do { /* find beginning of previous character */