Skip to content

Commit

Permalink
fix engine
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Aug 22, 2024
1 parent b657911 commit 6e8697e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/src/xmake/engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,12 +745,14 @@ static tb_size_t xm_engine_get_program_file(xm_engine_t* engine, tb_char_t** arg
}
#endif

tb_char_t const* p = argv? argv[0] : tb_null;
if (p && tb_file_info(p, tb_null))
if (!ok && argv)
{
tb_strlcpy(path, p, maxn);
ok = tb_true;
break;
tb_char_t const* p = argv[0];
if (p && tb_file_info(p, tb_null))
{
tb_strlcpy(path, p, maxn);
ok = tb_true;
}
}

} while (0);
Expand Down

0 comments on commit 6e8697e

Please sign in to comment.