Don't set a value twice (#1306)
This commit is contained in:
parent
7133ea5419
commit
b3937b0380
|
@ -377,7 +377,7 @@ static int Lutf8_codepoint (lua_State *L) {
|
||||||
luaL_checkstack(L, n, "string slice too long");
|
luaL_checkstack(L, n, "string slice too long");
|
||||||
n = 0; /* count the number of returns */
|
n = 0; /* count the number of returns */
|
||||||
se = s + pose; /* string end */
|
se = s + pose; /* string end */
|
||||||
for (n = 0, s += posi - 1; s < se;) {
|
for (s += posi - 1; s < se;) {
|
||||||
utfint code = 0;
|
utfint code = 0;
|
||||||
s = utf8_safe_decode(L, s, &code);
|
s = utf8_safe_decode(L, s, &code);
|
||||||
if (!lax && utf8_invalid(code))
|
if (!lax && utf8_invalid(code))
|
||||||
|
|
Loading…
Reference in New Issue