diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2016-08-12 17:36:58 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2016-08-12 22:35:25 -0400 |
commit | ee58923a8531731f8acb98ab130abf41f75ebdc7 (patch) | |
tree | 4b9b0387fa28a67e464ef2a74d0a41e75d9b3559 /sv.c | |
parent | 44348173fce5aaf28fdf59ba6ace73ea435d9380 (diff) | |
download | perl-ee58923a8531731f8acb98ab130abf41f75ebdc7.tar.gz |
[rt.perl.org #128909] printf %a mishandles exponent-crossing rounding with long double
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -12549,12 +12549,14 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p break; } } - if (v == v0 && overflow) { + if (v == v0 - 1 && overflow) { /* If the overflow goes all the * way to the front, we need to - * insert 0x1 in front. */ + * insert 0x1 in front, and adjust + * the argument. */ Move(v0, v0 + 1, vn, char); *v0 = 0x1; + exponent += 4; } } |