1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix crash in OS::execute on FreeBSD

As spotted by @robfram, closes #15288.
Also reviewed other uses of `if (String.find(.*))` for potential similar mistakes, found a wrong (and useless) one in ScriptEditorDialog.
This commit is contained in:
Rémi Verschelde
2018-01-04 01:00:11 +01:00
parent e68965672d
commit d65ac7378c
4 changed files with 10 additions and 11 deletions

View File

@@ -298,7 +298,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo
args.push_back(0);
#ifdef __FreeBSD__
if (p_path.find("/")) {
if (p_path.find("/") != -1) {
// exec name contains path so use it
execv(p_path.utf8().get_data(), &args[0]);
} else {