summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorArbStray <[email protected]>2026-07-31 10:25:25 +0800
committerArbStray <[email protected]>2026-07-31 10:25:25 +0800
commit73718fa6b1ca6be9a4aa0148501c73eefff328ed (patch)
treec165361db1bd90ac7814457919ecee8785b3ee60 /core/src
parenta928217681c4c5dc60b80a230182e5254bc30c8d (diff)
fixed wrong Lua stack index
Diffstat (limited to 'core/src')
-rw-r--r--core/src/xmake/process/open.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/src/xmake/process/open.c b/core/src/xmake/process/open.c
index b6cf272b2..5ae958f8d 100644
--- a/core/src/xmake/process/open.c
+++ b/core/src/xmake/process/open.c
@@ -75,7 +75,7 @@ tb_int_t xm_process_open(lua_State *lua) {
// get curdir
lua_pushstring(lua, "curdir");
- lua_gettable(lua, 3);
+ lua_gettable(lua, 2);
attr.curdir = lua_tostring(lua, -1);
lua_pop(lua, 1);
@@ -100,7 +100,7 @@ tb_int_t xm_process_open(lua_State *lua) {
// get infile
if (!inpath) {
lua_pushstring(lua, "infile");
- lua_gettable(lua, 3);
+ lua_gettable(lua, 2);
infile = (xm_io_file_t *)lua_touserdata(lua, -1);
lua_pop(lua, 1);
}
@@ -108,7 +108,7 @@ tb_int_t xm_process_open(lua_State *lua) {
// get outfile
if (!outpath) {
lua_pushstring(lua, "outfile");
- lua_gettable(lua, 3);
+ lua_gettable(lua, 2);
outfile = (xm_io_file_t *)lua_touserdata(lua, -1);
lua_pop(lua, 1);
}
@@ -116,7 +116,7 @@ tb_int_t xm_process_open(lua_State *lua) {
// get errfile
if (!errpath) {
lua_pushstring(lua, "errfile");
- lua_gettable(lua, 3);
+ lua_gettable(lua, 2);
errfile = (xm_io_file_t *)lua_touserdata(lua, -1);
lua_pop(lua, 1);
}
@@ -124,7 +124,7 @@ tb_int_t xm_process_open(lua_State *lua) {
// get inpipe
if (!inpath && !infile) {
lua_pushstring(lua, "inpipe");
- lua_gettable(lua, 3);
+ lua_gettable(lua, 2);
inpipe = (tb_pipe_file_ref_t)lua_touserdata(lua, -1);
lua_pop(lua, 1);
}
@@ -132,7 +132,7 @@ tb_int_t xm_process_open(lua_State *lua) {
// get outpipe
if (!outpath && !outfile) {
lua_pushstring(lua, "outpipe");
- lua_gettable(lua, 3);
+ lua_gettable(lua, 2);
outpipe = (tb_pipe_file_ref_t)lua_touserdata(lua, -1);
lua_pop(lua, 1);
}
@@ -140,7 +140,7 @@ tb_int_t xm_process_open(lua_State *lua) {
// get errpipe
if (!errpath && !errfile) {
lua_pushstring(lua, "errpipe");
- lua_gettable(lua, 3);
+ lua_gettable(lua, 2);
errpipe = (tb_pipe_file_ref_t)lua_touserdata(lua, -1);
lua_pop(lua, 1);
}