We need c to wrap around as an unsigned char when it is -1 (i.e. EOF).
@@ -1,5 +1,9 @@
dpkg (1.18.1) UNRELEASED; urgency=low
+ [ Guillem Jover ]
+ * Cast c_isbits() c argument to an unsigned char when indexing the array.
+ This fixes build failures on armel, armhf, ppc64el and s390x.
+
[ Updated programs translations ]
* German (Sven Joachim).
@@ -182,5 +182,5 @@ static unsigned short int c_ctype[256] = {
bool
c_isbits(int c, enum c_ctype_bit bits)
{
- return ((c_ctype[c] & bits) != 0);
+ return ((c_ctype[(unsigned char)c] & bits) != 0);
}