This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #131646] Assertion fail UTF-8 error msg
authorKarl Williamson <khw@cpan.org>
Sat, 24 Jun 2017 17:47:19 +0000 (11:47 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 24 Jun 2017 18:03:50 +0000 (12:03 -0600)
commit1d5030e143202c1e963e1fc91eb6f3afaa2df83e
tree1cfa27536a83386d2029f6157ebcf12bb18e7872
parent5cd155b07ed261125793850e101ebe6fa438c5e3
PATCH: [perl #131646] Assertion fail UTF-8 error msg

Instead of croaking with a proper message, creating the message creates
an assertion failure.

The cause was that there were two ++ operators on a string, so one
should subtract 2 to get to the string start, but only 1 was being
subtracted.

This is a 5.26 regression, but not terribly consequential, as the
program is about to die, but it is a trivial fix that allows the reason
the crash is happening to be properly displayed to aid debugging, so I'm
adding my vote for it for 5.26.1.
t/lib/warnings/utf8
utf8.c