This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.h: Add missing parens
authorKarl Williamson <public@khwilliamson.com>
Mon, 21 Nov 2011 23:58:30 +0000 (16:58 -0700)
committerKarl Williamson <public@khwilliamson.com>
Tue, 22 Nov 2011 00:20:24 +0000 (17:20 -0700)
These weren't caught because it only is compiled on an EBCDIC platform,
and I had to fake it to force the compilation

utf8.h

diff --git a/utf8.h b/utf8.h
index c77079d..6aa4412 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -310,7 +310,7 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
  */
 #ifdef EBCDIC /* Both versions assume well-formed UTF8 */
 #   define UTF8_IS_SURROGATE(s)  (*(s) == UTF_TO_NATIVE(0xF1)                   \
-      && (*((s) +1) == UTF_TO_NATIVE(0xB6)) || *((s) + 1) == UTF_TO_NATIVE(0xB7))
+    && ((*((s) +1) == UTF_TO_NATIVE(0xB6)) || *((s) + 1) == UTF_TO_NATIVE(0xB7)))
 #else
 #   define UTF8_IS_SURROGATE(s) (*(s) == 0xED && *((s) + 1) >= 0xA0)
 #endif