[llvm-branch-commits] [lldb] r198383 - Don't push chars when we don't get valid chars for the Apple Terminal.app work around for function keys.

Greg Clayton gclayton at apple.com
Thu Jan 2 16:40:48 PST 2014


Author: gclayton
Date: Thu Jan  2 18:40:47 2014
New Revision: 198383

URL: http://llvm.org/viewvc/llvm-project?rev=198383&view=rev
Log:
Don't push chars when we don't get valid chars for the Apple Terminal.app work around for function keys.


Modified:
    lldb/branches/iohandler/source/Core/IOHandler.cpp

Modified: lldb/branches/iohandler/source/Core/IOHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/iohandler/source/Core/IOHandler.cpp?rev=198383&r1=198382&r2=198383&view=diff
==============================================================================
--- lldb/branches/iohandler/source/Core/IOHandler.cpp (original)
+++ lldb/branches/iohandler/source/Core/IOHandler.cpp Thu Jan  2 18:40:47 2014
@@ -1638,11 +1638,12 @@ namespace curses
                             case 'S': ch = KEY_F(4); break;
                             default:
                                 escape_chars.push_back(ch2);
-                                escape_chars.push_back(ch3);
+                                if (ch3 != -1)
+                                    escape_chars.push_back(ch3);
                                 break;
                         }
                     }
-                    else
+                    else if (ch2 != -1)
                         escape_chars.push_back(ch2);
                 }
 #else





More information about the llvm-branch-commits mailing list