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:
parent
af55c4afb1
commit
c1e47013ef
@ -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; \
|
||||
|
Loading…
Reference in New Issue
Block a user