diff options
author | kwaclaw <kwaclaw> | 2006-04-14 17:19:09 +0000 |
---|---|---|
committer | kwaclaw <kwaclaw> | 2006-04-14 17:19:09 +0000 |
commit | f79358c4107a0126078001e129a9f457716a4a51 (patch) | |
tree | ef7d8b2a1ebc7adba0ad2c9886c6c0fcbd897b61 | |
parent | 4c371a3dd7cf147f91ba0fd7133ebf555b57c7ee (diff) | |
download | libexpat-f79358c4107a0126078001e129a9f457716a4a51.tar.gz |
One should not cast a pointer to unsigned long, as it may not work on non-32bit systems.
-rw-r--r-- | lib/xmlparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xmlparse.c b/lib/xmlparse.c index a2953ce..74ace1b 100644 --- a/lib/xmlparse.c +++ b/lib/xmlparse.c @@ -26,7 +26,7 @@ #define XmlGetInternalEncoding XmlGetUtf16InternalEncoding #define XmlGetInternalEncodingNS XmlGetUtf16InternalEncodingNS #define XmlEncode XmlUtf16Encode -#define MUST_CONVERT(enc, s) (!(enc)->isUtf16 || (((unsigned long)s) & 1)) +#define MUST_CONVERT(enc, s) (!(enc)->isUtf16 || ((s - NULL) & 1)) typedef unsigned short ICHAR; #else #define XML_ENCODE_MAX XML_UTF8_ENCODE_MAX |