From 53bb19cfe6d467bb129da1fcecdafee818b14bf4 Mon Sep 17 00:00:00 2001 From: c8ef Date: Fri, 10 May 2024 19:34:18 +0800 Subject: Update ansi.c --- core/src/xmake/winos/ansi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/xmake/winos/ansi.c b/core/src/xmake/winos/ansi.c index c24f98b2e..ee86d13ea 100644 --- a/core/src/xmake/winos/ansi.c +++ b/core/src/xmake/winos/ansi.c @@ -107,7 +107,7 @@ tb_int_t xm_winos_cp_info(lua_State* lua) lua_pushliteral(lua, "name"); tb_char_t* namebuf = tb_malloc_cstr(sizeof(cp_info.CodePageName) * 2); tb_assert_and_check_return_val(namebuf, 0); - tb_size_t namelen = tb_wtoa(namebuf, cp_info.CodePageName, sizeof(cp_info.CodePageName) * 2); + tb_size_t namelen = tb_wtoa(namebuf, (const tb_wchar_t *)cp_info.CodePageName, sizeof(cp_info.CodePageName) * 2); tb_assert_and_check_return_val(namelen < sizeof(cp_info.CodePageName) * 2, 0); lua_pushlstring(lua, namebuf, namelen); tb_free(namebuf); -- cgit v1.3.1