Handle backslash protection inside unquoted commands like:
(lldb) file hello\ world
correctly.
<rdar://problem/11093911>
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160591 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/Args.cpp b/source/Interpreter/Args.cpp
index a6eb1f0..5b3b679 100644
--- a/source/Interpreter/Args.cpp
+++ b/source/Interpreter/Args.cpp
@@ -230,7 +230,18 @@
break;
default:
- arg_pos = arg_end + 2;
+ if (quote_char == '\0')
+ {
+ arg.append (arg_piece_start, arg_end - arg_piece_start);
+ if (arg_end + 1 != '\0')
+ {
+ arg.append (arg_end + 1, 1);
+ arg_pos = arg_end + 2;
+ arg_piece_start = arg_pos;
+ }
+ }
+ else
+ arg_pos = arg_end + 2;
break;
}
break;