Skip to content

Commit

Permalink
Don't set a value twice (lite-xl#1306)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin authored Jan 5, 2023
1 parent 7133ea5 commit b3937b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit b3937b0

Please sign in to comment.