summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-01-04 01:00:11 +0100
committerRémi Verschelde <rverschelde@gmail.com>2018-01-04 01:20:20 +0100
commitd65ac7378c77648124e0e8acd09cea8fd0d104cd (patch)
tree635e19e3e146f2deddeedff7528f1f5b16bc6cac /drivers
parente68965672df8e06a1a6c977d3426b001a0767a9a (diff)
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.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/unix/os_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index cc4d060c02..fa8094f31a 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -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 {