netpbm/signed-char.patch

14 lines
700 B
Diff

Index: netpbm-10.96.4/converter/other/pnmtopalm/palmtopnm.c
===================================================================
--- netpbm-10.96.4.orig/converter/other/pnmtopalm/palmtopnm.c
+++ netpbm-10.96.4/converter/other/pnmtopalm/palmtopnm.c
@@ -873,7 +873,7 @@ readPackBitsRow(FILE * const if
pm_readcharu(ifP, &incountByte);
if (incountByte & 0x80) {
/* How do we handle incount == -128 ? */
- int const signedIncount = (char)incountByte;
+ int const signedIncount = (signed char)incountByte;
unsigned int const runlength = -signedIncount + 1;
unsigned char inval;
pm_readcharu(ifP, &inval);