From 6aff239d5283e5d4ba7b451221311e53b9690309 Mon Sep 17 00:00:00 2001 From: Bo Borgerson Date: Sun, 16 Aug 2009 11:07:39 -0400 Subject: String with NULL auto-increment bug fix Check position relative to end of string length rather than whether char is NULL at end of initial alphanumerics in Perl_sv_inc --- sv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sv.c') diff --git a/sv.c b/sv.c index b9f682cb63..a53669a324 100644 --- a/sv.c +++ b/sv.c @@ -7298,7 +7298,7 @@ Perl_sv_inc(pTHX_ register SV *const sv) d = SvPVX(sv); while (isALPHA(*d)) d++; while (isDIGIT(*d)) d++; - if (*d) { + if (d < SvEND(sv)) { #ifdef PERL_PRESERVE_IVUV /* Got to punt this as an integer if needs be, but we don't issue warnings. Probably ought to make the sv_iv_please() that does -- cgit v1.2.1