Fix sharding range problems when setting large int

This commit is contained in:
wangbin579 2019-10-18 20:29:18 +08:00
parent 1401572646
commit 73aad61c07

View File

@ -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" */