Don't set a value twice (#1306)

This commit is contained in:
Julien Voisin 2023-01-05 21:48:49 +01:00 committed by takase1121
parent d06c9f401c
commit d86413cc30
No known key found for this signature in database
GPG Key ID: 60EEFFC68EB3031B
1 changed files with 1 additions and 1 deletions

View File

@ -377,7 +377,7 @@ static int Lutf8_codepoint (lua_State *L) {
luaL_checkstack(L, n, "string slice too long");
n = 0; /* count the number of returns */
se = s + pose; /* string end */
for (n = 0, s += posi - 1; s < se;) {
for (s += posi - 1; s < se;) {
utfint code = 0;
s = utf8_safe_decode(L, s, &code);
if (!lax && utf8_invalid(code))