summaryrefslogtreecommitdiff
path: root/core/src/xmake/binutils/extractlib.c
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-11 22:43:52 +0800
committerruki <[email protected]>2025-12-12 09:00:43 +0800
commita6262f1fadbd0ae360dc336da298b86d4b9c1628 (patch)
treef9522a852620a0b64d7e6c03efe6aa2d8ee28c67 /core/src/xmake/binutils/extractlib.c
parent32f8a196cec67ea6cc409819a82235a2caf43921 (diff)
extract success for ar
Diffstat (limited to 'core/src/xmake/binutils/extractlib.c')
-rw-r--r--core/src/xmake/binutils/extractlib.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/src/xmake/binutils/extractlib.c b/core/src/xmake/binutils/extractlib.c
index 7a61d0bde..9385bc60f 100644
--- a/core/src/xmake/binutils/extractlib.c
+++ b/core/src/xmake/binutils/extractlib.c
@@ -110,10 +110,6 @@ tb_int_t xm_binutils_extractlib(lua_State *lua) {
break;
}
- if (ok) {
- lua_pushboolean(lua, ok);
- }
-
} while (0);
if (istream) {
@@ -121,6 +117,12 @@ tb_int_t xm_binutils_extractlib(lua_State *lua) {
tb_stream_exit(istream);
}
- return ok ? 1 : 2;
+ if (ok) {
+ lua_pushboolean(lua, tb_true);
+ return 1;
+ } else {
+ // error message should already be pushed
+ return 2;
+ }
}