Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-11-29 16:04:03 +0000
committerStijn Buys <ingar@osirion.org>2010-11-29 16:04:03 +0000
commit8774e65cc503318005f34c133cbaee21b18fc144 (patch)
tree907c120079597398abfda5d4791ce58573009e7c /src/core/commandbuffer.cc
parent2c7d185fdb03d17475deb9af1edaa82ffa51d4b6 (diff)
Parse command line options after engine initialization.
Diffstat (limited to 'src/core/commandbuffer.cc')
-rw-r--r--src/core/commandbuffer.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/commandbuffer.cc b/src/core/commandbuffer.cc
index 40971cc..58fe6be 100644
--- a/src/core/commandbuffer.cc
+++ b/src/core/commandbuffer.cc
@@ -316,7 +316,15 @@ void CommandBuffer::exec(std::string const &cmdline)
if (!cmdline.size())
return;
- std::istringstream cmdstream(cmdline);
+ std::string cleaned;
+
+ for (size_t i = 0; i < cmdline.size(); i++) {
+ if (cmdline[i] != '"') {
+ cleaned += cmdline[i];
+ }
+ }
+
+ std::istringstream cmdstream(cleaned);
std::string command;
if (!(cmdstream >> command))