commit 941d2b2: [Minor] Oops, fix logic

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Apr 16 13:21:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-04-16 14:16:19 +0100
URL: https://github.com/rspamd/rspamd/commit/941d2b26d2c4c714eff95ba8dd45b4cf4bf03ab4 (HEAD -> master)

[Minor] Oops, fix logic

---
 contrib/fpconv/fpconv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/fpconv/fpconv.c b/contrib/fpconv/fpconv.c
index 12c67cfa6..b01793400 100644
--- a/contrib/fpconv/fpconv.c
+++ b/contrib/fpconv/fpconv.c
@@ -220,7 +220,7 @@ static int emit_digits(char* digits, int ndigits, char* dest, int K, bool neg,
     }
 
     /* write decimal w/o scientific notation */
-    if(scientific && (K < 0 && (K > -7 || exp < 4))) {
+    if(!scientific || (K < 0 && (K > -7 || exp < 4))) {
         int offset = ndigits - absv(K);
         /* fp < 1.0 -> write leading zero */
         if(offset <= 0) {


More information about the Commits mailing list