diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-08-11 11:52:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 11:52:51 +0200 |
commit | e1bfa8b80a06d8241ce9112574731fc3d91fe12b (patch) | |
tree | 21d24800252dee703a43b44f2a89b730082a6ed5 | |
parent | 7a7448f29b3d42255f69cc6808ffe087d98229c5 (diff) | |
parent | 6a495f4d042000bb2583ab5d16b0354248833c6e (diff) |
Merge pull request #41128 from Xrayez/premature-tests
Properly detect `--test` command-line argument
-rw-r--r-- | main/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 5f791159f9..c5500a1f66 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -372,7 +372,7 @@ void Main::print_help(const char *p_binary) { int Main::test_entrypoint(int argc, char *argv[], bool &tests_need_run) { #ifdef TESTS_ENABLED for (int x = 0; x < argc; x++) { - if (strncmp(argv[x], "--test", 6) == 0) { + if ((strncmp(argv[x], "--test", 6) == 0) && (strlen(argv[x]) == 6)) { tests_need_run = true; OS::get_singleton()->initialize(); StringName::setup(); |