Patch #2481 2008-05-24 18:27

carjay

proposed patch against bug #013867
Download
2481-proposed_patch.patch (535 bytes)
Category
Plugin::Bugfix
Status
Accepted
Close date
2010-10-20 06:28
Assigned to
loaden
Index: src/plugins/codecompletion/parser/tokenizer.h
===================================================================
--- src/plugins/codecompletion/parser/tokenizer.h    (revision 5081)
+++ src/plugins/codecompletion/parser/tokenizer.h    (working copy)
@@ -131,7 +131,10 @@
 
     wxChar CurrentChar() const
     {
-        return m_Buffer.GetChar(m_TokenIndex);
+        if(m_TokenIndex < m_BufferLen)
+            return m_Buffer.GetChar(m_TokenIndex);
+        else
+            return 0;
     };
 
     wxChar CurrentCharMoveNext()