diff options
author | marcus <marcus@FreeBSD.org> | 2002-05-07 18:58:25 +0000 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2002-05-07 18:58:25 +0000 |
commit | 7f5149bb9efc376406183db731e5280cd26520c9 (patch) | |
tree | 62ba17c6c2e9e20e1374e13f130ac04559f5ede6 /editors/glimmer | |
parent | 6c6809d018a8eaa0f0d4626838392c22a431e9f4 (diff) | |
download | FreeBSD-ports-7f5149bb9efc376406183db731e5280cd26520c9.zip FreeBSD-ports-7f5149bb9efc376406183db731e5280cd26520c9.tar.gz |
Fix a spurious crash when invoking the editor on certain C files.
PR: 37785
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 f1a2378..ce8f0a8 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 0000000..538cf80 --- /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 |