]> granicus.if.org Git - libexpat/commitdiff
One should not cast a pointer to unsigned long, as it may not work on non-32bit systems.
authorKarl Waclawek <kwaclaw@users.sourceforge.net>
Fri, 14 Apr 2006 17:19:09 +0000 (17:19 +0000)
committerKarl Waclawek <kwaclaw@users.sourceforge.net>
Fri, 14 Apr 2006 17:19:09 +0000 (17:19 +0000)
expat/lib/xmlparse.c

index a2953cee24b3190bf87457ad735e5354996b2858..74ace1bc411cee3bf1fcead361d8f3b230e8e392 100644 (file)
@@ -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