This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_sv_pos_b2u now calls utf8_mg_len_cache_update for the string end offset.
authorNicholas Clark <nick@ccl4.org>
Mon, 12 Jul 2010 10:56:59 +0000 (11:56 +0100)
committerNicholas Clark <nick@ccl4.org>
Mon, 12 Jul 2010 12:43:19 +0000 (13:43 +0100)
commit0d7caf4cc74eb29a95f71af5a91fef30ca848e41
tree7f573fd94084d95d1ce1616c09d0ec7c282affc3
parent79d2d448469df7917fb728ca8a674f771610599c
Perl_sv_pos_b2u now calls utf8_mg_len_cache_update for the string end offset.

Previously it would not take special action if the offset requested happened to
be the end of the string, meaning that the (fixed size) UTF-8 offset cache
would be used for a value which could (and should) be stored elsewhere.
sv.c
t/op/pos.t