From bdf5e87c927348a6cf446e2840b2b14ad46a7dbc Mon Sep 17 00:00:00 2001 From: Cesare Tirabassi Date: Fri, 24 Jul 2009 14:48:54 +0200 Subject: [PATCH] workaround to fix feed_title being processed when not yet parsed --- src/rss.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/rss.c b/src/rss.c index 49124798..8ae7edbf 100644 --- a/src/rss.c +++ b/src/rss.c @@ -65,12 +65,13 @@ void rss_process_info(char *p, int p_max_size, char *uri, char *action, int snprintf(p, p_max_size, "prss: Error reading RSS data\n"); } else { if (strcmp(action, "feed_title") == EQUAL) { - str = data->title; - // remove trailing new line if one exists - if (str[strlen(str) - 1] == '\n') { - str[strlen(str) - 1] = 0; + if (str = data->title) { + // remove trailing new line if one exists + if (str[strlen(str) - 1] == '\n') { + str[strlen(str) - 1] = 0; + } + snprintf(p, p_max_size, "%s", str); } - snprintf(p, p_max_size, "%s", str); } else if (strcmp(action, "item_title") == EQUAL) { if (act_par < data->item_count) { str = data->items[act_par].title;