@@ -1700,13 +1700,14 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
1700
1700
* it changes 'uv' looked at by the others */
1701
1701
1702
1702
U32 this_problem = 1U << lsbit_pos32 (possible_problems );
1703
+ possible_problems &= ~this_problem ;
1704
+
1703
1705
switch (this_problem ) {
1704
1706
case UTF8_GOT_OVERFLOW :
1705
1707
1706
1708
/* Overflow means also got a super and are using Perl's
1707
1709
* extended UTF-8, but we handle all three cases here */
1708
- possible_problems
1709
- &= ~(UTF8_GOT_OVERFLOW |UTF8_GOT_SUPER |UTF8_GOT_PERL_EXTENDED );
1710
+ possible_problems &= ~(UTF8_GOT_SUPER |UTF8_GOT_PERL_EXTENDED );
1710
1711
* errors |= UTF8_GOT_OVERFLOW ;
1711
1712
1712
1713
/* But the API says we flag all errors found */
@@ -1757,7 +1758,6 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
1757
1758
break ;
1758
1759
1759
1760
case UTF8_GOT_EMPTY :
1760
- possible_problems &= ~UTF8_GOT_EMPTY ;
1761
1761
* errors |= UTF8_GOT_EMPTY ;
1762
1762
1763
1763
if (! (flags & UTF8_ALLOW_EMPTY )) {
@@ -1781,7 +1781,6 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
1781
1781
break ;
1782
1782
1783
1783
case UTF8_GOT_CONTINUATION :
1784
- possible_problems &= ~UTF8_GOT_CONTINUATION ;
1785
1784
* errors |= UTF8_GOT_CONTINUATION ;
1786
1785
1787
1786
if (! (flags & UTF8_ALLOW_CONTINUATION )) {
@@ -1802,7 +1801,6 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
1802
1801
break ;
1803
1802
1804
1803
case UTF8_GOT_SHORT :
1805
- possible_problems &= ~UTF8_GOT_SHORT ;
1806
1804
* errors |= UTF8_GOT_SHORT ;
1807
1805
1808
1806
if (! (flags & UTF8_ALLOW_SHORT )) {
@@ -1825,7 +1823,6 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
1825
1823
break ;
1826
1824
1827
1825
case UTF8_GOT_NON_CONTINUATION :
1828
- possible_problems &= ~UTF8_GOT_NON_CONTINUATION ;
1829
1826
* errors |= UTF8_GOT_NON_CONTINUATION ;
1830
1827
1831
1828
if (! (flags & UTF8_ALLOW_NON_CONTINUATION )) {
@@ -1853,7 +1850,6 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
1853
1850
break ;
1854
1851
1855
1852
case UTF8_GOT_SURROGATE :
1856
- possible_problems &= ~UTF8_GOT_SURROGATE ;
1857
1853
1858
1854
if (flags & UTF8_WARN_SURROGATE ) {
1859
1855
* errors |= UTF8_GOT_SURROGATE ;
@@ -1886,7 +1882,6 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
1886
1882
break ;
1887
1883
1888
1884
case UTF8_GOT_SUPER :
1889
- possible_problems &= ~UTF8_GOT_SUPER ;
1890
1885
1891
1886
if (flags & UTF8_WARN_SUPER ) {
1892
1887
* errors |= UTF8_GOT_SUPER ;
@@ -1963,7 +1958,6 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
1963
1958
break ;
1964
1959
1965
1960
case UTF8_GOT_NONCHAR :
1966
- possible_problems &= ~UTF8_GOT_NONCHAR ;
1967
1961
1968
1962
if (flags & UTF8_WARN_NONCHAR ) {
1969
1963
* errors |= UTF8_GOT_NONCHAR ;
@@ -1990,7 +1984,6 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
1990
1984
break ;
1991
1985
1992
1986
case UTF8_GOT_LONG :
1993
- possible_problems &= ~UTF8_GOT_LONG ;
1994
1987
* errors |= UTF8_GOT_LONG ;
1995
1988
1996
1989
if (flags & UTF8_ALLOW_LONG ) {
0 commit comments