Skip to content

Commit

Permalink
utf8::downgrade($x,FAIL_OK) is not supposed to treat FAIL_OK as an in…
Browse files Browse the repository at this point in the history
…teger
  • Loading branch information
demerphq committed Mar 21, 2014
1 parent 9e61631 commit 939b91a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion universal.c
Expand Up @@ -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);
Expand Down

0 comments on commit 939b91a

Please sign in to comment.