[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 95990] Changing history lines count to 1 causes a crash while
From:       "Kurt V.Hindenburg" <kurt.hindenburg () kdemail ! net>
Date:       2004-12-31 19:54:07
Message-ID: 20041231195407.32684.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
        
http://bugs.kde.org/show_bug.cgi?id=95990        




------- Additional Comments From kurt.hindenburg kdemail net  2004-12-31 20:54 \
------- 0x4009c9fd in HistoryScrollBuffer::getLineLen(int) (this=0x807bb24, lineno=1)
    at qgarray.h:79
79          uint        size()   const  { return shd->len; }

It appears that for viewing history is actually History->lines - 1, which causes this \
error.  Note that for saving history all the lines are saved.

This appears to fix this by having viewing history to actually be history->lines.
Needs testing....

Index: TEHistory.cpp
===================================================================
RCS file: /home/kde/kdebase/konsole/konsole/TEHistory.cpp,v
retrieving revision 1.25
diff -u -p -r1.25 TEHistory.cpp
--- TEHistory.cpp       28 Jun 2003 10:31:38 -0000      1.25
+++ TEHistory.cpp       31 Dec 2004 19:51:50 -0000
 @ -230,7 +230,8  @ void HistoryScrollBuffer::addCells(ca a[
      m_buffFilled = true;
     }

-  if (m_nbLines < m_maxNbLines - 1) ++m_nbLines;
+//  if (m_nbLines < m_maxNbLines - 1) ++m_nbLines;
+  if (m_nbLines < m_maxNbLines ) ++m_nbLines; // Fixes BR95990 ?!?

   // m_histBuffer.remove(m_arrayIndex); // not necessary
   m_histBuffer.insert(m_arrayIndex, newLine);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic