From 73aad61c075edbb86b82940f25d64681ff5d70d5 Mon Sep 17 00:00:00 2001 From: wangbin579 Date: Fri, 18 Oct 2019 20:29:18 +0800 Subject: [PATCH] Fix sharding range problems when setting large int --- src/sharding-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sharding-config.c b/src/sharding-config.c index b3455a3..28ba6bc 100644 --- a/src/sharding-config.c +++ b/src/sharding-config.c @@ -714,7 +714,7 @@ parse_partitions(cJSON *root, const sharding_vdb_t *vdb, GPtrArray *partitions / break; case cJSON_Number: /* range > 123 */ item = sharding_partition_new(cur->string, vdb); - item->value = (void *)(uint64_t)cur->valueint; + item->value = (void *)(uint64_t)cur->valuedouble; g_ptr_array_add(partitions, item); break; case cJSON_String: /* range > "str" */