From 7a43183a3f96649deb284a3ce76a10c303ecb286 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 11 Dec 2016 16:09:16 -0500 Subject: [PATCH] CLI2: Corrected str_replace calls --- src/CLI2.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 55dfc1aa5..1baf8ecc5 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -399,6 +399,7 @@ void CLI2::lexArguments () { bool quoted = Lexer::wasQuoted (_original_args[i].attribute ("raw")); + // Process single-token arguments. std::string lexeme; Lexer::Type type; Lexer lex (_original_args[i].attribute ("raw")); @@ -422,11 +423,13 @@ void CLI2::lexArguments () _args.push_back (a); } + + // Process muktiple-token arguments. else { std::string quote = "'"; std::string escaped = _original_args[i].attribute ("raw"); - str_replace (escaped, quote, "\\'"); + escaped = str_replace (escaped, quote, "\\'"); std::string::size_type cursor = 0; std::string word;