changeset 13940:fe1c92e1494a

[gaim-migrate @ 16475] Fix a bug where the last character of the value returned by gaim_strdup_withhtml would be cut off. I accidentally introduced this bug in my change a day or two ago. My bad! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 10 Jul 2006 06:59:27 +0000
parents 5d5c84239eea
children 46be62b128c7
files src/util.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/util.c	Sun Jul 09 04:44:58 2006 +0000
+++ b/src/util.c	Mon Jul 10 06:59:27 2006 +0000
@@ -2684,8 +2684,8 @@
 	g_return_val_if_fail(src != NULL, NULL);
 
 	/* New length is (length of src) + (number of \n's * 3) - (number of \r's) + 1 */
-	destsize = 0;
-	for (i = 0, j = 0; src[i] != '\0'; i++)
+	destsize = 1;
+	for (i = 0; src[i] != '\0'; i++)
 	{
 		if (src[i] == '\n')
 			destsize += 4;