diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2002-05-07 18:58:25 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2002-05-07 18:58:25 +0000 |
commit | c4df2bbd2ef6650f76d1578a953f4f379c3a0cd0 (patch) | |
tree | 1a94e9a0e8a5c58ebd4cc9917edcad83835c0440 /editors/glimmer | |
parent | add kludge3d 20020301 (diff) |
Fix a spurious crash when invoking the editor on certain C files.
PR: 37785
Notes
Notes:
svn path=/head/; revision=58670
Diffstat (limited to 'editors/glimmer')
-rw-r--r-- | editors/glimmer/Makefile | 1 | ||||
-rw-r--r-- | editors/glimmer/files/patch-src_mdi-routines.c | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/editors/glimmer/Makefile b/editors/glimmer/Makefile index f1a2378c1413..ce8f0a847fe3 100644 --- a/editors/glimmer/Makefile +++ b/editors/glimmer/Makefile @@ -7,6 +7,7 @@ PORTNAME= glimmer PORTVERSION= 1.2.1 +PORTREVISION= 1 CATEGORIES= editors gnome python MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/editors/glimmer/files/patch-src_mdi-routines.c b/editors/glimmer/files/patch-src_mdi-routines.c new file mode 100644 index 000000000000..538cf80ed740 --- /dev/null +++ b/editors/glimmer/files/patch-src_mdi-routines.c @@ -0,0 +1,23 @@ +--- src/mdi-routines.c.orig Tue May 7 13:35:06 2002 ++++ src/mdi-routines.c Tue May 7 13:40:16 2002 +@@ -150,7 +150,7 @@ + length = text->length; + line = text->line_number + 1; + lines = GTK_EXTEXT (cur_file->text)->line_count + 1; +- if (pos >= 0 && pos <= text->length && text->length > 0) ++ if (pos >= 0 && pos < text->length && text->length > 0) + cur_char = GTK_EXTEXT_INDEX (text, pos); + else + cur_char = 0; +@@ -166,7 +166,10 @@ + else + gtk_widget_set_sensitive (search_menu_match, TRUE); + +- cur_char = GTK_EXTEXT_INDEX (text, pos); ++ if (pos < text->length) ++ cur_char = GTK_EXTEXT_INDEX (text, pos); ++ else ++ cur_char = 0; + if (cur_char < 1 || !strchr ("{[()]}", cur_char) || length < 1) + gtk_widget_set_sensitive (search_menu_select, FALSE); + else |