# HG changeset patch
# User Eric Warmenhoven <eric@warmenhoven.org>
# Date 1002644588 0
# Node ID 308f010ed664d1df9aa3e78f2dce5457831d884d
# Parent  50163c916f9d540bcb609b2e6bc4d5d8161f7e12
[gaim-migrate @ 2469]
hm

committer: Tailor Script <tailor@pidgin.im>

diff -r 50163c916f9d -r 308f010ed664 src/gtkspell.c
--- a/src/gtkspell.c	Tue Oct 09 01:38:16 2001 +0000
+++ b/src/gtkspell.c	Tue Oct 09 16:23:08 2001 +0000
@@ -355,10 +355,11 @@
 	}
 
 	if (buf) {
-		*buf = g_malloc(end - start + 1);
+		char *tmp = g_malloc(end - start + 1);
 		for (pos = start; pos < end; pos++) 
-			(*buf)[pos-start] = GTK_TEXT_INDEX(gtktext, pos);
-		(*buf)[pos-start] = 0;
+			tmp[pos-start] = GTK_TEXT_INDEX(gtktext, pos);
+		tmp[pos-start] = 0;
+		*buf = tmp;
 	}
 
 	if (pstart) *pstart = start;