diff options
author | Yves Orton <demerphq@gmail.com> | 2014-03-21 17:47:45 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2014-06-02 00:33:19 +0200 |
commit | 3ca75eca84b9d0987b69e271b2c50cae574df77e (patch) | |
tree | 859b2b0a182700092186ec498503b8f9e6e10d1a /universal.c | |
parent | b94d11d663eee9a5d693a9ebb9cdad0f6ba6b881 (diff) | |
download | perl-3ca75eca84b9d0987b69e271b2c50cae574df77e.tar.gz |
universal.c - utf8::downgrade($x,FAIL_OK) is not supposed to treat FAIL_OK as an integer
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/universal.c b/universal.c index 65e02dfcce..777a924323 100644 --- a/universal.c +++ b/universal.c @@ -513,7 +513,7 @@ XS(XS_utf8_downgrade) croak_xs_usage(cv, "sv, failok=0"); else { SV * const sv = ST(0); - const bool failok = (items < 2) ? 0 : (int)SvIV(ST(1)); + const bool failok = (items < 2) ? 0 : SvTRUE(ST(1)) ? 1 : 0; const bool RETVAL = sv_utf8_downgrade(sv, failok); ST(0) = boolSV(RETVAL); |