From e5147e6a4d9a73f0b0b8027be2aaca7005e557c2 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Sat, 8 Jul 2017 21:56:18 +0200 Subject: [PATCH] Save 10 bytes --- src/ArduinoJson/Polyfills/normalize.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ArduinoJson/Polyfills/normalize.hpp b/src/ArduinoJson/Polyfills/normalize.hpp index b495784ae..f88b8571e 100644 --- a/src/ArduinoJson/Polyfills/normalize.hpp +++ b/src/ArduinoJson/Polyfills/normalize.hpp @@ -23,7 +23,7 @@ int16_t normalize(T& value) { if (value >= ARDUINOJSON_POSITIVE_EXPONENTIATION_THRESHOLD) { for (; index >= 0; index--) { if (value >= FloatTraits::positiveBinaryPowerOfTen(index)) { - value /= FloatTraits::positiveBinaryPowerOfTen(index); + value *= FloatTraits::negativeBinaryPowerOfTen(index); powersOf10 = int16_t(powersOf10 + bit); } bit >>= 1;