diff options
| author | ruki <[email protected]> | 2026-07-31 19:16:16 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-31 19:16:16 +0800 |
| commit | bafb5d4b802017b8d6c3583fee26574d902abc6b (patch) | |
| tree | e288579bbbb2a49cfeb49139282ba7e61e012860 /core/src | |
| parent | 42f51e6526b5ebffa80b55fc68c42585bde13aa5 (diff) | |
| parent | 73718fa6b1ca6be9a4aa0148501c73eefff328ed (diff) | |
Merge pull request #7684 from ArbStray/fix/process-open-wrong-stack-index
fix: correct Lua stack index in process.open
Diffstat (limited to 'core/src')
| -rw-r--r-- | core/src/xmake/process/open.c | 14 |
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); } |
