diff options
author | TAKAI Kousuke <62541129+t-a-k@users.noreply.github.com> | 2022-07-08 21:07:17 +0900 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2022-07-11 11:12:28 +1000 |
commit | b04606273aff02cd30bd1d7dff2797554474eec8 (patch) | |
tree | 9c0700f0bb8338c8ff7bf255ee975ac140f1c055 /pp_sys.c | |
parent | f192c227eefb2861335e0592230df7f6d7607abf (diff) | |
download | perl-b04606273aff02cd30bd1d7dff2797554474eec8.tar.gz |
setsockopt: treat boolean values as numbers
Boolean values used to be treated as string, but this is not desirable.
(thanks to @tonycoz)
Also added tests for this.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2723,7 +2723,7 @@ PP(pp_ssockopt) const char *buf; int aint; SvGETMAGIC(sv); - if (SvPOK(sv)) { /* sv is originally a string */ + if (SvPOK(sv) && !SvIsBOOL(sv)) { /* sv is originally a string */ STRLEN l; buf = SvPVbyte_nomg(sv, l); len = l; |