Преглед на файлове

added a way to force crash, type crash in search and shift-control click

scott brogden преди 5 години
родител
ревизия
0f26928bc1
променени са 1 файла, в които са добавени 14 реда и са изтрити 0 реда
  1. 14 0
      QPasteWnd.cpp

+ 14 - 0
QPasteWnd.cpp

@@ -27,6 +27,7 @@
 #include "CF_TextAggregator.h"
 #include "htmlformataggregator.h"
 #include "shared/Tokenizer.h"
+#include <signal.h>
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -6628,6 +6629,19 @@ void CQPasteWnd::OnUpdateSpecialpasteTypoglycemia(CCmdUI *pCmdUI)
 
 void CQPasteWnd::OnNMClickList1(NMHDR *pNMHDR, LRESULT *pResult)
 {
+	CString csText;
+	m_search.GetWindowText(csText);
+	if (csText == _T("crash"))
+	{
+		if (CONTROL_PRESSED)
+		{
+			if (GetKeyState(VK_SHIFT) & 0x8000)
+			{
+				raise(SIGSEGV);
+			}
+		}
+	}
+
 	LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
 	MSG msg;
 	msg.lParam = 0;