Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv15977
Modified Files:
gtkspell.c
Log Message:
stupid, stupid
Index: gtkspell.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkspell.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- gtkspell.c 2001/10/09 16:23:08 1.9
+++ gtkspell.c 2001/10/09 18:01:06 1.10
@@ -354,12 +354,11 @@
if (iswordsep(GTK_TEXT_INDEX(gtktext, end))) break;
}
- if (buf) {
- char *tmp = g_malloc(end - start + 1);
+ if (buf && (end - start + 1 > 0)) {
+ *buf = g_malloc(end - start + 1);
for (pos = start; pos < end; pos++)
- tmp[pos-start] = GTK_TEXT_INDEX(gtktext, pos);
- tmp[pos-start] = 0;
- *buf = tmp;
+ (*buf)[pos-start] = GTK_TEXT_INDEX(gtktext, pos);
+ (*buf)[pos-start] = 0;
}
if (pstart) *pstart = start;
|