From 260d78c9ff623f5d456f7d39acc9715eec2a85f4 Mon Sep 17 00:00:00 2001 From: Gisle Aas Date: Wed, 28 Dec 2005 11:01:46 +0000 Subject: Remove test for NUL ending in r?instr(). This test is actually harmful because we will search for any garbage found past the empty search string. Ref change 26509. p4raw-id: //depot/perl@26510 --- util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index a88d988b9a..c082f5bc7b 100644 --- a/util.c +++ b/util.c @@ -356,7 +356,7 @@ Perl_ninstr(pTHX_ register const char *big, register const char *bigend, const c register const I32 first = *little; register const char * const littleend = lend; - if (!first && little >= littleend) + if (little >= littleend) return (char*)big; if (bigend - big < littleend - little) return Nullch; @@ -388,7 +388,7 @@ Perl_rninstr(pTHX_ register const char *big, const char *bigend, const char *lit register const I32 first = *little; register const char * const littleend = lend; - if (!first && little >= littleend) + if (little >= littleend) return (char*)bigend; bigbeg = big; big = bigend - (littleend - little++); -- cgit v1.2.1