10000 Fix GCC 4.8.5 warning · thehellmaker/ArduinoJson@353bbd0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 353bbd0

Browse files
committed
Fix GCC 4.8.5 warning
1 parent a428e12 commit 353bbd0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ArduinoJson/Serialization/FloatParts.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ struct FloatParts {
2727
exponent = normalize(value);
2828

2929
integral = uint32_t(value);
30-
TFloat remainder = value - TFloat(integral);
30+
TFloat remainder = (value - TFloat(integral)) * TFloat(maxDecimalPart);
3131

32-
remainder *= maxDecimalPart;
3332
decimal = uint32_t(remainder);
3433
remainder = remainder - TFloat(decimal);
3534

0 commit comments

Comments
 (0)
0