From 7e58bd88ca4991979bf063ef8eb94c57ed97773a Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 2 Jan 2005 00:23:50 +0000 Subject: [PATCH] Cast the values passed to the macros so as to avoid sign-extending 8-bit characters. svn path=/trunk/; revision=12922 --- gtk/follow_dlg.c | 2 +- plugins/asn1/packet-asn1.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/follow_dlg.c b/gtk/follow_dlg.c index c5da79bdc7..678394ba2b 100644 --- a/gtk/follow_dlg.c +++ b/gtk/follow_dlg.c @@ -761,7 +761,7 @@ follow_print_text(char *buffer, int nchars, gboolean is_server _U_, void *arg) for (i = 0; i < nchars; i++) { if (buffer[i] == '\n' || buffer[i] == '\r') continue; - if (! isprint(buffer[i])) { + if (! isprint((guchar)buffer[i])) { buffer[i] = '.'; } } diff --git a/plugins/asn1/packet-asn1.c b/plugins/asn1/packet-asn1.c index 2c66bba046..9f78479d52 100644 --- a/plugins/asn1/packet-asn1.c +++ b/plugins/asn1/packet-asn1.c @@ -4802,7 +4802,7 @@ getPDUenum(PDUprops *props, guint offset, guint cls, guint tag, guint value) /* Routines to handle parsing a list of ports */ /* * * * * * * * * * * * * * * * * * * * * * * * */ -#define SKIPWHITE(_s) { while(isspace(*(_s))) { (_s)++; } } +#define SKIPWHITE(_s) { while(isspace((guchar)*(_s))) { (_s)++; } } /* insert error text in front of spec * with a delimeter we can recognize on next attempt @@ -4875,7 +4875,7 @@ static GSList *parse_port_range(gchar *s, int len) SKIPWHITE(es); - if (isdigit(*es)) + if (isdigit((guchar)*es)) continue; /* a missig comma is OK */ switch(*es++) {