Cast the values passed to the <ctype.h> macros so as to avoid
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 2 Jan 2005 00:23:50 +0000 (00:23 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 2 Jan 2005 00:23:50 +0000 (00:23 +0000)
sign-extending 8-bit characters.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12922 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/follow_dlg.c
plugins/asn1/packet-asn1.c

index c5da79bdc7a4a8076709363d4d235d1c61bd4f4c..678394ba2b67a29fc5c92db044d95f1e51aef6e0 100644 (file)
@@ -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] = '.';
         }
     }
index 2c66bba046c6b0695b6e95287f98c4d79c7465df..9f78479d526fe849a9df9319ac7dc18ea1d08f11 100644 (file)
@@ -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++) {