From 1608f06540537f3f1586c28b58cfab10d16ec06e Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 10 Jul 2019 00:34:53 +0800 Subject: fix compile error --- 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 da4349d3c..2d56d77a9 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 = xm_wcstoutf8(namebuf, cp_info.CodePageName, sizeof(cp_info.CodePageName) * 2); + tb_size_t namelen = tb_wtoa(namebuf, 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