summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-07-10 00:34:53 +0800
committerruki <[email protected]>2019-07-09 21:29:18 +0800
commit1608f06540537f3f1586c28b58cfab10d16ec06e (patch)
treef0db26ac2427244f8492d5f5ad16f1d0dc669e25
parent45c4a826ea4c6ce5967dd37b79ee668367cabcfd (diff)
fix compile error
-rw-r--r--core/src/xmake/winos/ansi.c2
1 files changed, 1 insertions, 1 deletions
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);