diff options
| author | ruki <[email protected]> | 2026-02-03 10:22:14 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-03 10:22:14 +0800 |
| commit | 7a9f668793b387efc3d657ceedbd0ab913dab4e0 (patch) | |
| tree | 1516224d2d661413fe5e786a67a83484784b2d76 | |
| parent | f99b99b2ae3cfeb47356e6542c393bba009f8583 (diff) | |
Update engine.c
| -rw-r--r-- | core/src/xmake/engine.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c index 32a4855cf..9c02d8487 100644 --- a/core/src/xmake/engine.c +++ b/core/src/xmake/engine.c @@ -875,7 +875,8 @@ static tb_bool_t xm_engine_get_program_file(xm_engine_t *engine, tb_char_t **arg if (size > 0 && size < maxn) { path[size] = '\0'; // ignore cosmocc ape binary, we fallback to argv[0], .e.g /usr/bin/ape, /home/ruki/.ape-1.10 - if (!tb_strstr(path, "ape")) { + tb_char_t const* filename = tb_strrchr(path, '/'); + if (!tb_strstr(filename ? filename + 1 : path, "ape")) { ok = tb_true; } } |
