summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwaclaw <kwaclaw>2006-04-14 17:19:09 +0000
committerkwaclaw <kwaclaw>2006-04-14 17:19:09 +0000
commitf79358c4107a0126078001e129a9f457716a4a51 (patch)
treeef7d8b2a1ebc7adba0ad2c9886c6c0fcbd897b61
parent4c371a3dd7cf147f91ba0fd7133ebf555b57c7ee (diff)
downloadlibexpat-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.c2
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