ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/src extgtktext.c,1.4,1.5


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src extgtktext.c,1.4,1.5
Date: Tue, 14 Jan 2003 16:54:50 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv21562/src

Modified Files:
        extgtktext.c 
Log Message:
check params before segfaulting


Index: extgtktext.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/extgtktext.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- extgtktext.c        1 Jan 2003 14:22:45 -0000       1.4
+++ extgtktext.c        14 Jan 2003 21:54:47 -0000      1.5
@@ -1371,6 +1371,11 @@
 {
   ExtGtkText *text = (ExtGtkText *) editable;
   
+  if (position < 0)
+        position = 0;
+  if (position > TEXT_LENGTH (text) -1)
+         position = TEXT_LENGTH (text) -1;
+  
   undraw_cursor (text, FALSE);
   text->cursor_mark = find_mark (text, position);
   find_cursor (text, TRUE);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]