From 0e93328ca717bec75167d57f7e0606f86c00a532 Mon Sep 17 00:00:00 2001 From: Richard Leach Date: Thu, 12 Dec 2024 22:09:05 +0000 Subject: [PATCH] pp_substr: tweak len_is_uv assignment for readability As suggested in https://github.com/Perl/perl5/pull/22785 --- pp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pp.c b/pp.c index 910e53cf7a2a..549faef4d076 100644 --- a/pp.c +++ b/pp.c @@ -3604,7 +3604,7 @@ PP_wrapped(pp_substr, } if ((len_sv = POPs)) { len_iv = SvIV(len_sv); - len_is_uv = len_iv ? SvIOK_UV(len_sv) : 1; + len_is_uv = len_iv == 0 || SvIOK_UV(len_sv); } else num_args--; }