diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-02-11 09:19:54 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-02-11 09:19:54 +0000 |
commit | f99bb93e552820fe4d0ab67f01361c76712c19e7 (patch) | |
tree | f5dc44d122e67563e38b5a49fd432f33eaf63b69 /range.c | |
parent | 8177fbd5503cf1698a469e763766f81fa75e8bf7 (diff) | |
download | wireshark-f99bb93e552820fe4d0ab67f01361c76712c19e7.tar.gz wireshark-f99bb93e552820fe4d0ab67f01361c76712c19e7.tar.bz2 wireshark-f99bb93e552820fe4d0ab67f01361c76712c19e7.zip |
Cast "char" values to "guchar" before passing them to <ctype.h> macros,
so that characters with the 8th bit set don't get sign-extended and
cause the macros not to return the right answer.
svn path=/trunk/; revision=10036
Diffstat (limited to 'range.c')
-rw-r--r-- | range.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,7 +1,7 @@ /* range.c * Packet range routines (save, print, ...) * - * $Id: range.c,v 1.8 2004/01/09 18:10:40 ulfl Exp $ + * $Id: range.c,v 1.9 2004/02/11 09:19:54 guy Exp $ * * Dick Gooris <gooris@lucent.com> * Ulf Lamping <ulf.lamping@web.de> @@ -288,7 +288,7 @@ void packet_range_convert_str(packet_range_t *range, const gchar *es) /* Only keep digits, commas, and hyphens. */ for (i=0; i<=strlen(OrgStr); i++) { - if ( isdigit(OrgStr[i]) || OrgStr[i] == '-' || OrgStr[i] == ',' ) { + if ( isdigit((guchar)OrgStr[i]) || OrgStr[i] == '-' || OrgStr[i] == ',' ) { EntryStr[j++] = OrgStr[i]; } } @@ -349,7 +349,7 @@ void packet_range_convert_str(packet_range_t *range, const gchar *es) for (i=0; i<=strlen(EntryStr);i++) { /* Copy the digit string until a no-digit character is seen */ - if (isdigit(EntryStr[i])) { + if (isdigit((guchar)EntryStr[i])) { value[j++] = EntryStr[i]; continue; } |