summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--generic/tkText.c8
2 files changed, 16 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d4c87c..7d95bce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,18 @@
+2000-07-19 Eric Melski <ericm@ajubasolutions.com>
+
+ * generic/tkText.c (TextSearchCmd): Added a test for a NULL
+ segment pointer when doing backwards searches for "" on an empty
+ text widget. [Bug: 6007].
+
2000-07-18 Mo DeJong <mdejong@redhat.com>
* unix/aclocal.m4: Use tcl.m4.
- * unix/configure.in: Properly quote
- LOCALES variable. Properly quote
+
+ * unix/configure.in: Properly quote LOCALES variable. Properly quote
argument to m4 macro.
+
* unix/tcl.m4: Add updated file from tcl.
+
* win/tcl.m4: Updated file from tcl.
2000-07-18 Eric Melski <ericm@ajubasolutions.com>
diff --git a/generic/tkText.c b/generic/tkText.c
index d92363b..f4ebda7 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.c,v 1.14 2000/02/03 17:29:57 ericm Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.15 2000/07/19 18:13:50 ericm Exp $
*/
#include "default.h"
@@ -1955,10 +1955,14 @@ TextSearchCmd(textPtr, interp, argc, argv)
* account for embedded windows or any other non-textual info.
* Scan through the line's segments again to adjust both
* matchChar and matchCount.
+ *
+ * We will walk through the segments of this line until we have
+ * either reached the end of the match or we have reached the end
+ * of the line.
*/
for (segPtr = linePtr->segPtr, leftToScan = matchByte;
- leftToScan >= 0; segPtr = segPtr->nextPtr) {
+ leftToScan >= 0 && segPtr; segPtr = segPtr->nextPtr) {
if (segPtr->typePtr != &tkTextCharType) {
matchByte += segPtr->size;
continue;