ia32: get_eip and fpu_trunc_mode are not always NULL before transformation
[libfirm] / ir / libcore / lc_appendable.c
index 65503af..a2806ed 100644 (file)
@@ -32,8 +32,8 @@ int lc_appendable_snwadd(lc_appendable_t *app, const char *str, size_t len,
                unsigned int width, int left_just, char pad)
 {
        int res = 0;
-       int i;
-       int to_pad = width - len;
+       size_t i;
+       size_t to_pad = width > len ? width - len : 0;
 
        /* If not left justified, pad left */
        for (i = 0; !left_just && i < to_pad; ++i)