mirror of
https://github.com/dlang/phobos.git
synced 2025-05-09 21:11:57 +03:00
Merge pull request #7438 from Luhrel/fixFormat
Fix incorrect use of sprintf format merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
This commit is contained in:
commit
0300b493f4
1 changed files with 2 additions and 2 deletions
|
@ -243,8 +243,8 @@ version (StdUnittest) private
|
|||
alias real_t = real;
|
||||
|
||||
() @trusted {
|
||||
ix = sprintf(bufx.ptr, "%.*Lg", ndigits, cast(real_t) x);
|
||||
iy = sprintf(bufy.ptr, "%.*Lg", ndigits, cast(real_t) y);
|
||||
ix = sprintf(bufx.ptr, is(real_t == real) ? "%.*Lg" : "%.*g", ndigits, cast(real_t) x);
|
||||
iy = sprintf(bufy.ptr, is(real_t == real) ? "%.*Lg" : "%.*g", ndigits, cast(real_t) y);
|
||||
} ();
|
||||
|
||||
assert(ix < bufx.length && ix > 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue