1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +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

@@ -4423,7 +4423,7 @@ void EditorNode::_dropped_files(const Vector<String> &p_files, int p_screen) {
for (int i = 0; i < p_files.size(); i++) {
String from = p_files[i];
if (!ResourceFormatImporter::get_singleton()->can_be_imported(from) && (just_copy.find(from.get_extension().to_lower()) < 0)) {
if (!ResourceFormatImporter::get_singleton()->can_be_imported(from) && (just_copy.find(from.get_extension().to_lower()) != -1)) {
continue;
}
String to = to_path.plus_file(from.get_file());