1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +00:00

Bugfix: sometimes segfaults with cpubar

This commit is contained in:
Nikolas Garofil 2009-05-07 18:44:45 +02:00
parent af55c4afb1
commit c1e47013ef

View File

@ -1296,7 +1296,7 @@ static struct text_object *construct_text_object(const char *s,
END OBJ(cached, INFO_BUFFERS)
#define SCAN_CPU(__arg, __var) { \
int __offset; \
if (__arg && sscanf(__arg, " cpu%u %n", &__var, &__offset)) \
if (__arg && sscanf(__arg, " cpu%u %n", &__var, &__offset) == 2) \
__arg += __offset; \
else \
__var = 0; \