mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-23 19:39:06 +00:00
Fixed crash when RSS feed item didn't have title
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@879 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
02960c2c7f
commit
204886795a
12
src/conky.c
12
src/conky.c
@ -4330,12 +4330,14 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object *
|
||||
else show = obj->data.rss.act_par;
|
||||
for(itmp = 0; itmp < show; itmp++) {
|
||||
PRSS_Item *item = &data->items[itmp];
|
||||
if(i>0)
|
||||
strncat(p, "\n", p_max_size);
|
||||
str = item->title;
|
||||
if(str[strlen(str)-1] == '\n')
|
||||
str[strlen(str)-1] = 0; // remove trailing new line if one exists
|
||||
strncat(p, item->title, p_max_size);
|
||||
if(str) {
|
||||
if(i>0)
|
||||
strncat(p, "\n", p_max_size);
|
||||
if(str[strlen(str)-1] == '\n')
|
||||
str[strlen(str)-1] = 0; // remove trailing new line if one exists
|
||||
strncat(p, item->title, p_max_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user