From: Christoph Sommer Date: Sun, 9 Apr 2006 21:13:48 +0000 (+0000) Subject: Fixed bug with console crashing on 0-length commands X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8b9d7f0cc609407654e1c71283da3b3aaf255027;p=supertux.git Fixed bug with console crashing on 0-length commands SVN-Revision: 3281 --- diff --git a/src/console.cpp b/src/console.cpp index f3e022072..41d2d7c62 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -126,6 +126,9 @@ Console::addLine(std::string s) void Console::parse(std::string s) { + // make sure we actually have something to parse + if (s.length() == 0) return; + // split line into list of args std::vector args; size_t start = 0;