signed to unsigned before comparing
authorNikolas Garofil <garo@dunaldi.garofil.be>
Sat, 16 Jan 2010 03:01:49 +0000 (04:01 +0100)
committerNikolas Garofil <garo@dunaldi.garofil.be>
Sat, 16 Jan 2010 03:01:49 +0000 (04:01 +0100)
src/core.c

index 0c173da..7b50030 100644 (file)
@@ -1250,7 +1250,7 @@ int extract_variable_text_internal(struct text_object *retval, const char *const
                                }
 
                                /* 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);
                                buf[len] = '\0';