]> sjero.net Git - wget/commitdiff
[svn] Fix broken cast of BIT to unsigned char.
authorhniksic <devnull@localhost>
Mon, 22 Sep 2003 02:05:34 +0000 (19:05 -0700)
committerhniksic <devnull@localhost>
Mon, 22 Sep 2003 02:05:34 +0000 (19:05 -0700)
src/ChangeLog
src/safe-ctype.h

index 6d95e45d162cb6f712cce3feb6d6079dd3ab0ded..524788199ce40cde5794339db08628fb88705d47 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * safe-ctype.h (_sch_test): The cast of BIT to unsigned char was
+       broken -- _sch_istable bitmasks are 16-bit, not 8-bit!  Cast BIT
+       to unsigned short instead.
+
 2003-09-22  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * url.c (path_simplify): Instead of calls to memmove, handle "./"
index af88a26baac45e18463479f813bf3a8ec4c4c369..0c5c5863fe26a9af0417ca955c4408a9cf43a8e0 100644 (file)
@@ -100,7 +100,7 @@ enum {
 /* Character classification.  */
 extern const unsigned short _sch_istable[256];
 
-#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned char)(bit))
+#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
 
 #define ISALPHA(c)  _sch_test(c, _sch_isalpha)
 #define ISALNUM(c)  _sch_test(c, _sch_isalnum)