[PATCH v3] Fix variadic type mismatch in pushutfchar -- passes long but %U expects unsigned long

"'Weixie Cui' via lua-l" <[email protected]>
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
From: Weixie Cui <[email protected]>

---
 lutf8lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lutf8lib.c b/lutf8lib.c
index b7f3fe1e..732f51b0 100644
--- a/lutf8lib.c
+++ b/lutf8lib.c
@@ -146,7 +146,7 @@ static int codepoint (lua_State *L) {
 static void pushutfchar (lua_State *L, int arg) {
   lua_Unsigned code = (lua_Unsigned)luaL_checkinteger(L, arg);
   luaL_argcheck(L, code <= MAXUTF, arg, "value out of range");
-  lua_pushfstring(L, "%U", (long)code);
+  lua_pushfstring(L, "%U", (unsigned long)code);
 }
 
 
-- 
2.39.5 (Apple Git-154)

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/tencent_A991AC4CFB842F6C15F40234951F295C7D05%40qq.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.