diff options
author | Gisle Aas <gisle@activestate.com> | 2005-12-28 11:01:46 +0000 |
---|---|---|
committer | Gisle Aas <gisle@activestate.com> | 2005-12-28 11:01:46 +0000 |
commit | 260d78c9ff623f5d456f7d39acc9715eec2a85f4 (patch) | |
tree | f24890ba5bc69c0cc950b3e1871e488a4b148dea /util.c | |
parent | ad07e1310bf8286a17223f4f5f7abcb6926d9c81 (diff) | |
download | perl-260d78c9ff623f5d456f7d39acc9715eec2a85f4.tar.gz |
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
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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++); |