mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 06:13:14 -07:00
Fix the case where eout % 3 produces a negative value
This commit is contained in:
parent
690b3001fb
commit
5ed7e55d65
1 changed files with 1 additions and 1 deletions
|
@ -1171,7 +1171,7 @@ wstring NumberToString(_Inout_ PNUMBER& pnum, NumberFormat format, uint32_t radi
|
||||||
{
|
{
|
||||||
if (format == NumberFormat::Engineering)
|
if (format == NumberFormat::Engineering)
|
||||||
{
|
{
|
||||||
exponent = (eout % 3);
|
exponent = (3 + (eout % 3)) % 3;
|
||||||
eout -= exponent;
|
eout -= exponent;
|
||||||
exponent++;
|
exponent++;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue