From 0db281c4ffdebc9d66e473b64615acde83a84e02 Mon Sep 17 00:00:00 2001 From: congqixia Date: Wed, 17 Aug 2022 16:14:49 +0800 Subject: [PATCH] Fix DataType::bool cast to double (#18690) Signed-off-by: Congqi Xia Signed-off-by: Congqi Xia --- internal/core/src/segcore/Utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/src/segcore/Utils.cpp b/internal/core/src/segcore/Utils.cpp index d0ee78015a..e14063027d 100644 --- a/internal/core/src/segcore/Utils.cpp +++ b/internal/core/src/segcore/Utils.cpp @@ -77,7 +77,7 @@ CreateScalarDataArrayFrom(const void* data_raw, int64_t count, const FieldMeta& auto scalar_array = data_array->mutable_scalars(); switch (data_type) { case DataType::BOOL: { - auto data = reinterpret_cast(data_raw); + auto data = reinterpret_cast(data_raw); auto obj = scalar_array->mutable_bool_data(); obj->mutable_data()->Add(data, data + count); break;