changeset 15276:84b215400b6b

[gaim-migrate @ 18066] fix 1576566 committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 03 Jan 2007 02:07:05 +0000
parents 363c1e41042c
children 623affd9a13e
files gtk/gtkthemes.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/gtkthemes.c	Tue Jan 02 15:04:45 2007 +0000
+++ b/gtk/gtkthemes.c	Wed Jan 03 02:07:05 2007 +0000
@@ -119,9 +119,13 @@
 				theme->list = child;
 			list = child;
 		} else if (!g_ascii_strncasecmp(i, "Name=", strlen("Name="))) {
+			int len;
 			g_free(theme->name);
 			theme->name = g_strdup(i+ strlen("Name="));
-			theme->name[strlen(theme->name)-1] = 0;
+			len = strlen(theme->name);
+			theme->name[len-1] = 0;
+			if(len > 2 && theme->name[len-2] == '\r')
+				theme->name[len-2] = 0;
 		} else if (!g_ascii_strncasecmp(i, "Description=", strlen("Description="))) {
 			g_free(theme->desc);
 			theme->desc = g_strdup(i + strlen("Description="));