src/conversation.c

changeset 4895
51794f61995e
parent 4877
7d1f4381fed0
child 5103
d19766adbae1
--- a/src/conversation.c	Wed Mar 26 02:57:17 2003 +0000
+++ b/src/conversation.c	Wed Mar 26 06:19:44 2003 +0000
@@ -253,7 +253,7 @@
 			int imflags = 0;
 
 			if (conv->u.im->images != NULL) {
-				int id = 1, offset = 0;
+				int id = 0, offset = 0;
 				char *bigbuf = NULL;
 				GSList *tmplist;
 
@@ -267,6 +267,8 @@
 					struct stat st;
 					char imgtag[1024];
 
+					id++;
+
 					if (stat(img_filename, &st) != 0) {
 						debug_printf("Could not stat %s\n",
 									 (char *)img_filename);
@@ -328,7 +330,6 @@
 							strlen("</DATA>") + 1);
 
 					offset += strlen("</DATA>");
-					id++;
 				}
 
 				if (binary) {
@@ -354,7 +355,7 @@
 						g_free(tempy->data);
 					}
 
-					g_slist_free(tempy);
+					g_slist_free(conv->u.im->images);
 					conv->u.im->images = NULL;
 
 					if (binary)

mercurial