Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15806/src/gui

Modified Files:
        wxllist.cpp 
Log Message:
Fix (?) bug #899 'Crashes on highlighting URL links for copy/paste'

Index: wxllist.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxllist.cpp,v
retrieving revision 1.162
retrieving revision 1.163
diff -b -u -2 -r1.162 -r1.163
--- wxllist.cpp 7 Apr 2004 11:37:57 -0000       1.162
+++ wxllist.cpp 8 Sep 2004 06:40:28 -0000       1.163
@@ -337,5 +337,7 @@
       object what we clicked on, but before - otherwise it looks
       funny. */
-   return (xpos > 2) ? offs-2 : 0;
+   CoordType ret = (offs > 2) ? offs-2 : 0;
+   wxASSERT(ret >= 0);
+   return ret;
 }
 
@@ -847,4 +849,6 @@
       {
          *cxpos = cx + obj->GetOffsetScreen(dc, xpos-x);
+         wxASSERT(*cxpos>=0);
+         wxASSERT(xpos>=0);
 
          if ( found )
@@ -1938,4 +1942,5 @@
          CoordType len = line->GetLength();
          m_CursorPos.x = (len >= p.x) ? p.x : len;
+         wxASSERT(m_CursorPos.x >= 0);
          m_CursorPos.y = p.y;
          m_CursorLine = line;
@@ -1984,4 +1989,5 @@
          {
             m_CursorPos.x = m_CursorLine->GetLength();
+            wxASSERT(m_CursorPos.x >= 0);
             rc = false;
             break;
@@ -2020,4 +2026,5 @@
       if(move > m_CursorPos.x) move = m_CursorPos.x;
       m_CursorPos.x -= move; n += move;
+      wxASSERT(m_CursorPos.x >= 0);
    }
 
@@ -2037,4 +2044,5 @@
       m_CursorPos.x += move;
       n -= move;
+      wxASSERT(m_CursorPos.x >= 0);
    }
 
@@ -2672,4 +2680,5 @@
                                     &cx,
                                     &foundinline);
+     wxASSERT(cx >= 0);
      cursorPos->x = cx;
    }
@@ -2749,4 +2758,5 @@
 
    wxLogStatus(_T("Cursor is at (%d, %d)"), m_CursorPos.x, m_CursorPos.y);
+   wxASSERT(m_CursorPos.x >= 0);
 #endif
 



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to