Confirm should accept both "Y" and "y" in case somebody confuses the "default answer" indicator for a
directive to enter a capital letter.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144562 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/CommandInterpreter.cpp b/source/Interpreter/CommandInterpreter.cpp
index f37bc62..beb73b0 100644
--- a/source/Interpreter/CommandInterpreter.cpp
+++ b/source/Interpreter/CommandInterpreter.cpp
@@ -1793,12 +1793,12 @@
{
reader.SetIsDone(true);
}
- else if (bytes[0] == 'y')
+ else if (bytes[0] == 'y' || bytes[0] == 'Y')
{
*response_ptr = true;
reader.SetIsDone(true);
}
- else if (bytes[0] == 'n')
+ else if (bytes[0] == 'n' || bytes[0] == 'N')
{
*response_ptr = false;
reader.SetIsDone(true);
@@ -1807,7 +1807,7 @@
{
if (out_file.IsValid() && !reader.IsDone() && reader.GetPrompt())
{
- out_file.Printf ("Please answer \"y\" or \"n\"\n%s", reader.GetPrompt());
+ out_file.Printf ("Please answer \"y\" or \"Y\" or \"n\" or \"N\"\n%s", reader.GetPrompt());
out_file.Flush ();
}
}