Revision: 1075
http://vcs.pcre.org/viewvc?view=rev&revision=1075
Author: chpe
Date: 2012-10-16 16:54:51 +0100 (Tue, 16 Oct 2012)
Log Message:
-----------
pcre32: compile: Fix signed/unsigned mismatch in GET_UCD
Modified Paths:
--------------
code/trunk/pcre_internal.h
Modified: code/trunk/pcre_internal.h
===================================================================
--- code/trunk/pcre_internal.h 2012-10-16 15:54:47 UTC (rev 1074)
+++ code/trunk/pcre_internal.h 2012-10-16 15:54:51 UTC (rev 1075)
@@ -2622,15 +2622,15 @@
#define UCD_BLOCK_SIZE 128
#define GET_UCD(ch) (PRIV(ucd_records) + \
- PRIV(ucd_stage2)[PRIV(ucd_stage1)[(ch) / UCD_BLOCK_SIZE] * \
- UCD_BLOCK_SIZE + (ch) % UCD_BLOCK_SIZE])
+ PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \
+ UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE])
#define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype
#define UCD_SCRIPT(ch) GET_UCD(ch)->script
#define UCD_CATEGORY(ch) PRIV(ucp_gentype)[UCD_CHARTYPE(ch)]
#define UCD_GRAPHBREAK(ch) GET_UCD(ch)->gbprop
#define UCD_CASESET(ch) GET_UCD(ch)->caseset
-#define UCD_OTHERCASE(ch) (ch + GET_UCD(ch)->other_case)
+#define UCD_OTHERCASE(ch) ((pcre_uint32)((int)ch + (int)(GET_UCD(ch)->other_case)))
#endif /* SUPPORT_UCP */