diff options
author | Tony Cook <tony@develop-help.com> | 2014-12-18 14:48:34 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-12-18 15:37:10 +1100 |
commit | 696efa16de2cd1abedf24104d680f3d0983587f4 (patch) | |
tree | 053538896adce35bad5ee438cb8a7e659e97068c | |
parent | a0f879f6b9a3c4bfa5eefc87794df01addfd0d76 (diff) | |
download | perl-696efa16de2cd1abedf24104d680f3d0983587f4.tar.gz |
fix PerlIO::scalar get_cnt when the file position is beyond 2GB
This caused a new test to fail on 32-bit builds.
-rw-r--r-- | ext/PerlIO-scalar/scalar.xs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs index 9ccded57e4..7f429d5d7a 100644 --- a/ext/PerlIO-scalar/scalar.xs +++ b/ext/PerlIO-scalar/scalar.xs @@ -277,7 +277,7 @@ PerlIOScalar_get_cnt(pTHX_ PerlIO * f) PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar); STRLEN len; (void)SvPV(s->var,len); - if (len > (STRLEN) s->posn) + if ((Off_t)len > s->posn) return len - (STRLEN)s->posn; else return 0; |