summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-02 13:14:41 +0800
committerOpportunityLiu <[email protected]>2019-07-02 13:14:41 +0800
commit6456d8cb86c13725fca1f58b5b1412efdef7538d (patch)
treedb98d176211f5edfb3086caeade7c3e584fae47d
parentb94789d65449527a17187cf00fc2ed887f40df58 (diff)
fix make file
-rw-r--r--core/src/xmake/machine.c8
-rw-r--r--core/src/xmake/makefile2
2 files changed, 5 insertions, 5 deletions
diff --git a/core/src/xmake/machine.c b/core/src/xmake/machine.c
index 098966f24..11e086229 100644
--- a/core/src/xmake/machine.c
+++ b/core/src/xmake/machine.c
@@ -332,12 +332,12 @@ static tb_bool_t xm_machine_save_arguments(xm_machine_t* machine, tb_int_t argc,
{
#ifdef TB_CONFIG_OS_WINDOWS
tb_char_t argvbuf[4096] = {0};
- tb_wcstombs(argvbuf, argvw[i], 4096);
- argv[i] = argvbuf;
-#endif
-
+ tb_wcstombs(argvbuf, argvw[i], tb_arrayn(argvbuf));
// table_new[table.getn(table_new) + 1] = argv[i]
+ lua_pushstring(machine->lua, argvbuf);
+#else
lua_pushstring(machine->lua, argv[i]);
+#endif
lua_rawseti(machine->lua, -2, (int)lua_objlen(machine->lua, -2) + 1);
}
diff --git a/core/src/xmake/makefile b/core/src/xmake/makefile
index b528d00ba..f35becda6 100644
--- a/core/src/xmake/makefile
+++ b/core/src/xmake/makefile
@@ -46,7 +46,7 @@ xmake_C_FILES += \
os/getown \
io/file___len \
io/file___tostring \
- io/file_close \
+ io/file_close___gc \
io/file_flush \
io/file_isatty \
io/file_path \