1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-13 11:15:27 +00:00

Merge branch 'master' of git.omp.am:/home/omp/git/conky

This commit is contained in:
Cesare Tirabassi 2009-07-18 06:42:25 +02:00
commit 25fcd618d4

View File

@ -2945,8 +2945,12 @@ static struct text_object *construct_text_object(const char *s,
obj->data.scroll.step = 1; obj->data.scroll.step = 1;
if (arg && sscanf(arg, "%u %n", &obj->data.scroll.show, &n1) > 0) { if (arg && sscanf(arg, "%u %n", &obj->data.scroll.show, &n1) > 0) {
if (sscanf(arg + n1, "%u %n", &obj->data.scroll.step, &n2) > 0) sscanf(arg + n1, "%u %n", &obj->data.scroll.step, &n2);
if(*(arg + n1 + n2)) {
n1 += n2; n1 += n2;
}else{
obj->data.scroll.step = 1;
}
obj->data.scroll.text = strndup(arg + n1, text_buffer_size); obj->data.scroll.text = strndup(arg + n1, text_buffer_size);
obj->data.scroll.start = 0; obj->data.scroll.start = 0;
obj->sub = malloc(sizeof(struct text_object)); obj->sub = malloc(sizeof(struct text_object));