summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-29 17:41:24 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-29 17:41:24 +0800
commitb66ded0d42cefe1f2d17640b146cadf82cf40280 (patch)
treea5f5bc2e263f1c9b7a92f94008545fb222814547
parent0824be8a339dc39719754a4f683c231cd1e89331 (diff)
Cast the weight first & only then divide
-rw-r--r--pikul.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pikul.c b/pikul.c
index 6ca3ddf..78ec3d6 100644
--- a/pikul.c
+++ b/pikul.c
@@ -302,7 +302,7 @@ char *pikul_shopify(char *origins[], char *destinations[], long grams)
continue;
}
services[company] = pikul_services(company, origins[company],
- destinations[company], (double)(grams / 1000));
+ destinations[company], (double)grams / 1000.0);
}
static const char *prefix = "{\"rates\":[";
const size_t prefix_len = strlen(prefix);