diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-11-17 22:54:17 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-11-17 22:54:17 +0000 |
commit | 1d963ff3e27fd02ffafca14b9a60d1e71f32caa7 (patch) | |
tree | 513178eec5ae0fa885444f4dd122a60dabadbf38 /pp_ctl.c | |
parent | e389bba906c384f4fc3f3ad5e721e737cbd5d54e (diff) | |
download | perl-1d963ff3e27fd02ffafca14b9a60d1e71f32caa7.tar.gz |
S_save_lines() was using strchr() when it should have been using
memchr(). Result - eval""ed source with embedded NULs was not split
correctly into lines for the debugger. Obscure. But still a bug.
Maybe the Campaign for the Elimination of strlen() needs to take a long
hard stare at every strchr() too. And strmp() while we're looking.
p4raw-id: //depot/perl@34876
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2764,7 +2764,7 @@ S_save_lines(pTHX_ AV *array, SV *sv) const char *t; SV * const tmpstr = newSV_type(SVt_PVMG); - t = strchr(s, '\n'); + t = (const char *)memchr(s, '\n', send - s); if (t) t++; else |