summarylogtreecommitdiffstats
path: root/madedit-max-linelength-fix.patch
blob: 0e843c2a1e7a2bb0906cc27be9024352e4d590b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- src/MadEdit/MadEdit.cpp.orig	2010-01-20 22:58:48.597349646 -0430
+++ src/MadEdit/MadEdit.cpp	2010-01-20 22:59:47.210672188 -0430
@@ -737,6 +737,8 @@
     m_Config->Read(wxT("MaxLineLength"), &m_MaxLineLength, 4096);
     if(m_MaxLineLength<80) m_MaxLineLength=80;
 
+    if(m_MaxLineLength>4096) m_MaxLineLength=4096;
+
     m_WordBuffer = new ucs4_t[m_MaxLineLength+1];
 #ifdef __WXMSW__
     m_WCWordBuffer=new wchar_t[(m_MaxLineLength+1)*2];