Fixed bug with console crashing on 0-length commands
authorChristoph Sommer <mail@christoph-sommer.de>
Sun, 9 Apr 2006 21:13:48 +0000 (21:13 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Sun, 9 Apr 2006 21:13:48 +0000 (21:13 +0000)
SVN-Revision: 3281

src/console.cpp

index f3e0220..41d2d7c 100644 (file)
@@ -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<std::string> args;
   size_t start = 0;