Skip to content

Commit

Permalink
Update src/webots/control/WbController.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: David Mansolino <mansolino.david@gmail.com>
  • Loading branch information
omichel and DavidMansolino authored Jun 2, 2020
1 parent 2408492 commit ff69ab5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/webots/control/WbController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,9 @@ QStringList WbController::argsList() const {
if (args[i] == '"')
quote = !quote;
if (args[i] == ' ' && !quote) {
list << args.mid(previous, i - previous - 1).replace("\"", "");
const QString argument = args.mid(previous, i - previous).replace("\"", "").trimmed();
if (!argument.isEmpty())
list << args.mid(previous, i - previous).replace("\"", "");
previous = i + 1;
}
}
Expand Down

0 comments on commit ff69ab5

Please sign in to comment.