summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>2005-10-21 01:04:40 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-10-21 15:44:38 +0000
commit15547071d7923e1ad71df03a6a5f4bf10b39825e (patch)
tree61d7ccb7bd478aece49364aa9b9cedec3a343d07 /pp_sys.c
parent9a9897716602799978192865b19161f65ea040c1 (diff)
downloadperl-15547071d7923e1ad71df03a6a5f4bf10b39825e.tar.gz
allow "" as select bitmask [PATCH]
Message-ID: <lrach229o7.fsf_-_@caliper.activestate.com> p4raw-id: //depot/perl@25818
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pp_sys.c b/pp_sys.c
index cf6a862c29..b907093b9c 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1031,14 +1031,14 @@ PP(pp_sselect)
SP -= 4;
for (i = 1; i <= 3; i++) {
SV *sv = SP[i];
- if (SvOK(sv) && SvREADONLY(sv)) {
+ if (!SvOK(sv))
+ continue;
+ if (SvREADONLY(sv)) {
if (SvIsCOW(sv))
sv_force_normal_flags(sv, 0);
- if (SvREADONLY(sv))
+ if (SvREADONLY(sv) && !(SvPOK(sv) && SvCUR(sv) == 0))
DIE(aTHX_ PL_no_modify);
}
- if (!SvOK(sv))
- continue;
if (!SvPOK(sv)) {
if (ckWARN(WARN_MISC))
Perl_warner(aTHX_ packWARN(WARN_MISC), "Non-string passed as bitmask");
@@ -1093,7 +1093,7 @@ PP(pp_sselect)
for (i = 1; i <= 3; i++) {
sv = SP[i];
- if (!SvOK(sv)) {
+ if (!SvOK(sv) || SvCUR(sv) == 0) {
fd_sets[i] = 0;
continue;
}