This fixes plugins that use it to break lines read using fgets()
and forget that "\n" is left at the buffer's end. At least
battery and wireless plugins is affected.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
i = 0;
ptr = string;
saveptr = NULL;
- while ((fields[i] = strtok_r (ptr, " \t", &saveptr)) != NULL)
+ while ((fields[i] = strtok_r (ptr, " \t\r\n", &saveptr)) != NULL)
{
ptr = NULL;
i++;