diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-29 16:04:03 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-29 16:04:03 +0000 |
commit | 8774e65cc503318005f34c133cbaee21b18fc144 (patch) | |
tree | 907c120079597398abfda5d4791ce58573009e7c /src/core/commandbuffer.cc | |
parent | 2c7d185fdb03d17475deb9af1edaa82ffa51d4b6 (diff) |
Parse command line options after engine initialization.
Diffstat (limited to 'src/core/commandbuffer.cc')
-rw-r--r-- | src/core/commandbuffer.cc | 10 |
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)) |