From 8b4607e1d3a3b175db8303145879ac650f3b24a3 Mon Sep 17 00:00:00 2001 From: kientzle Date: Mon, 2 Apr 2007 00:29:52 +0000 Subject: Don't compare a signed char to 0xFF. Thanks to: Joerg Sonnenberger --- lib/libarchive/archive_read_support_format_iso9660.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libarchive/archive_read_support_format_iso9660.c') diff --git a/lib/libarchive/archive_read_support_format_iso9660.c b/lib/libarchive/archive_read_support_format_iso9660.c index c892f72..2b3e0fa 100644 --- a/lib/libarchive/archive_read_support_format_iso9660.c +++ b/lib/libarchive/archive_read_support_format_iso9660.c @@ -286,7 +286,7 @@ archive_read_format_iso9660_bid(struct archive_read *a) struct iso9660 *iso9660; ssize_t bytes_read; const void *h; - const char *p; + const unsigned char *p; iso9660 = (struct iso9660 *)*(a->pformat_data); @@ -301,7 +301,7 @@ archive_read_format_iso9660_bid(struct archive_read *a) bytes_read = (a->compression_read_ahead)(a, &h, 32768 + 8*2048); if (bytes_read < 32768 + 8*2048) return (iso9660->bid = -1); - p = (const char *)h; + p = (const unsigned char *)h; /* Skip the reserved area. */ bytes_read -= 32768; @@ -312,7 +312,7 @@ archive_read_format_iso9660_bid(struct archive_read *a) iso9660->bid = isPVD(iso9660, p); if (iso9660->bid > 0) return (iso9660->bid); - if (*p == '\xff') /* End-of-volume-descriptor marker. */ + if (*p == '\177') /* End-of-volume-descriptor marker. */ break; } -- cgit v1.1