Skip to content

Commit 6e8697e

Browse files
committed
fix engine
1 parent b657911 commit 6e8697e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

core/src/xmake/engine.c

+7-5
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,14 @@ static tb_size_t xm_engine_get_program_file(xm_engine_t* engine, tb_char_t** arg
745745
}
746746
#endif
747747

748-
tb_char_t const* p = argv? argv[0] : tb_null;
749-
if (p && tb_file_info(p, tb_null))
748+
if (!ok && argv)
750749
{
751-
tb_strlcpy(path, p, maxn);
752-
ok = tb_true;
753-
break;
750+
tb_char_t const* p = argv[0];
751+
if (p && tb_file_info(p, tb_null))
752+
{
753+
tb_strlcpy(path, p, maxn);
754+
ok = tb_true;
755+
}
754756
}
755757

756758
} while (0);

0 commit comments

Comments
 (0)