1 diff -ruN rrdcollect-0.2.3.orig/src/scan.c rrdcollect-0.2.3/src/scan.c
2 --- rrdcollect-0.2.3.orig/src/scan.c 2005-01-20 18:42:17.000000000 +0100
3 +++ rrdcollect-0.2.3/src/scan.c 2006-01-22 00:51:52.000000000 +0100
5 } while (isdigit(*fmt));
8 + /* skip white spaces like scanf does */
9 + if (strchr("difuoxX", *fmt))
10 + while (isspace(*buf))
13 /* FIXME: we should check afterward:
14 * if (start == buf || start == '-' && buf-start == 1)
15 * die("WTF??? zero-length number???");
20 - /* ignore if value not found */
25 - counter[i++]->value = valuedup(value);
26 + counter[i++]->value = strndup(start, buf - start);
31 + length = 1; // default length is 1
33 while (*buf && length > 0) {
39 - /* ignore if value not found */
44 - counter[i++]->value = valuedup(value);
45 + counter[i++]->value = strndup(start, buf - start);
52 /* don't match if not at least one space */
53 - if(!isspace(*(buf)))
62 - while (isspace(*(buf)))
63 + while (isspace(*buf))