aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMilan Crha <mcrha@src.gnome.org>2007-08-23 19:55:04 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-08-23 19:55:04 +0800
commit181da374bb47aea71fc2de35cb5044589b919f2b (patch)
tree4a31b1cf80bc893da0032c43b788979ed5a9ce38 /calendar/gui
parent9bc8f8f6de5ae7e06d77574ae1f4d304affb30c2 (diff)
downloadgsoc2013-evolution-181da374bb47aea71fc2de35cb5044589b919f2b.tar.gz
gsoc2013-evolution-181da374bb47aea71fc2de35cb5044589b919f2b.tar.zst
gsoc2013-evolution-181da374bb47aea71fc2de35cb5044589b919f2b.zip
2007-08-23 mcrha Fix for bug #347770
svn path=/trunk/; revision=34073
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-cal-component-memo-preview.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/calendar/gui/e-cal-component-memo-preview.c b/calendar/gui/e-cal-component-memo-preview.c
index 4ae6854a27..9a0a8c854b 100644
--- a/calendar/gui/e-cal-component-memo-preview.c
+++ b/calendar/gui/e-cal-component-memo-preview.c
@@ -227,11 +227,14 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
gtk_html_stream_printf (stream, "<TD>");
for (node = l; node != NULL; node = node->next) {
- gint i, j;
- GString *string = g_string_new (NULL);
+ gint i, j, len;
+ GString *string;
text = * (ECalComponentText *) node->data;
- for (i = 0, j=0; i < strlen (text.value ? text.value : 0); i++, j++) {
+ len = (text.value ? strlen (text.value) : 0);
+ string = g_string_sized_new (len + 1);
+
+ for (i = 0, j=0; i < len; i++, j++) {
if (text.value[i] == '\n'){
string = g_string_append_len (string, "<BR>", 4);
}