1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-28 13:00:45 +00:00

signed to unsigned before comparing

This commit is contained in:
Nikolas Garofil 2010-01-16 04:01:49 +01:00
parent 8264fbe05e
commit a218eb70ef

View File

@ -1250,7 +1250,7 @@ int extract_variable_text_internal(struct text_object *retval, const char *const
} }
/* copy variable to buffer */ /* copy variable to buffer */
len = (p - s > text_buffer_size-1) ? text_buffer_size-1 : (p - s); len = ((unsigned int) (p - s) > text_buffer_size - 1) ? text_buffer_size - 1 : (unsigned int) (p - s);
strncpy(buf, s, len); strncpy(buf, s, len);
buf[len] = '\0'; buf[len] = '\0';