Add a missing cast for some platforms
authorSteven Barth <steven@midlink.org>
Fri, 21 Dec 2012 14:55:00 +0000 (15:55 +0100)
committerSteven Barth <steven@midlink.org>
Fri, 21 Dec 2012 14:55:00 +0000 (15:55 +0100)
src/script.c

index ff81278bf59b6f3e1dd1082634f5086aed1da505..66a15a770ac1d0088b88cb7b0adad4842e539f9f 100644 (file)
@@ -58,7 +58,8 @@ ssize_t script_unhexlify(uint8_t *dst, size_t len, const char *src)
                                || y < 0 || (y = hexvals[y]) < 0)
                        return -1;
                dst[c] = x << 4 | y;
-               while (*src < 0 || (*src && hexvals[(uint8_t)*src] < 0))
+               while (((int8_t)*src) < 0 ||
+                               (*src && hexvals[(uint8_t)*src] < 0))
                        src++;
        }