utf8.h: Parenthesize macro parameter
authorKarl Williamson <public@khwilliamson.com>
Mon, 24 Dec 2012 02:01:34 +0000 (19:01 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 24 Dec 2012 02:39:05 +0000 (19:39 -0700)
This apparently hasn't caused us problems, but all uses of a macro
paramenter should be parenthesized to prevent surprises.

utf8.h

diff --git a/utf8.h b/utf8.h
index 1df972b..5aac904 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -174,7 +174,7 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
 /* Use UTF8_IS_NEXT_CHAR_DOWNGRADEABLE() instead if the input isn't known to
  * be well-formed.  Masking with 0xfe allows low bit to be 0 or 1; thus this
  * matches 0xc[23]. */
-#define UTF8_IS_DOWNGRADEABLE_START(c) (((U8)c & 0xfe) == 0xc2)
+#define UTF8_IS_DOWNGRADEABLE_START(c) (((U8)(c) & 0xfe) == 0xc2)
 
 #define UTF8_IS_ABOVE_LATIN1(c)        ((U8)(c) >= 0xc4)