diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2016-08-12 17:36:58 -0400 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2017-08-09 13:23:18 +0100 |
commit | 79314a4f38d4e66f5f4f7abf4726748163c07c90 (patch) | |
tree | 9f369b1154dc97785f523591e6d1dcafaf239d2a /sv.c | |
parent | 3d1a8d12c01c9ebed0c52169733b593180901b7a (diff) | |
download | perl-79314a4f38d4e66f5f4f7abf4726748163c07c90.tar.gz |
[rt.perl.org #128909] printf %a mishandles exponent-crossing rounding with long double
(cherry picked from commit ee58923a8531731f8acb98ab130abf41f75ebdc7)
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -12557,12 +12557,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; } } |