aboutsummaryrefslogtreecommitdiffstats
path: root/range.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-02-11 09:19:54 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-02-11 09:19:54 +0000
commit38a6d03ee17628eb7aeec8b808f87357c0ca9125 (patch)
treef5dc44d122e67563e38b5a49fd432f33eaf63b69 /range.c
parentff8c85541dd2151b68cfd1b1e4c32adfadd9f699 (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10036 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'range.c')
-rw-r--r--range.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/range.c b/range.c
index cea55eb419..0ff0dcacf5 100644
--- a/range.c
+++ b/range.c
@@ -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;
}