Don't set a value twice (#1306)

This commit is contained in:
Julien Voisin 2023-01-05 21:48:49 +01:00 committed by GitHub
parent 7133ea5419
commit b3937b0380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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))