From f2206b2abe848f65956fa48da338c2bfac599e4a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sat, 27 Jul 2024 15:13:21 -0300 Subject: '-Wconversion' extended to all options of Lua numbers --- lutf8lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lutf8lib.c') diff --git a/lutf8lib.c b/lutf8lib.c index 6dfdd1f4..04bbfa56 100644 --- a/lutf8lib.c +++ b/lutf8lib.c @@ -103,7 +103,7 @@ static int utflen (lua_State *L) { lua_pushinteger(L, posi + 1); /* ... and current position */ return 2; } - posi = s1 - s; + posi = ct_diff2S(s1 - s); n++; } lua_pushinteger(L, n); @@ -137,7 +137,7 @@ static int codepoint (lua_State *L) { s = utf8_decode(s, &code, !lax); if (s == NULL) return luaL_error(L, MSGInvalid); - lua_pushinteger(L, code); + lua_pushinteger(L, l_castU2S(code)); n++; } return n; @@ -240,7 +240,7 @@ static int iter_aux (lua_State *L, int strict) { if (next == NULL || iscontp(next)) return luaL_error(L, MSGInvalid); lua_pushinteger(L, l_castU2S(n + 1)); - lua_pushinteger(L, code); + lua_pushinteger(L, l_castU2S(code)); return 2; } } -- cgit v1.2.3-55-g6feb