From 919f15bb36d50af75f3491b88fde851b7a8a92af Mon Sep 17 00:00:00 2001 From: rayx Date: Thu, 12 Mar 2026 12:22:37 +0800 Subject: [PATCH] fix: fix uint8 conversion overflow (#215) --- src/include/zvec/ailego/internal/platform.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/zvec/ailego/internal/platform.h b/src/include/zvec/ailego/internal/platform.h index ecfe673..598ca97 100644 --- a/src/include/zvec/ailego/internal/platform.h +++ b/src/include/zvec/ailego/internal/platform.h @@ -476,11 +476,11 @@ static inline void ailego_assert_report(const char *file, const char *func, // is undefined (on arm, result will be zero), it's necessary to convert it // to signed integer firstly static inline uint8_t static_cast_from_float_to_uint8(float data) { - return static_cast(static_cast(data)); + return static_cast(static_cast(data)); } static inline uint16_t static_cast_from_float_to_uint16(float data) { - return static_cast(static_cast(data)); + return static_cast(static_cast(data)); } #ifdef __cplusplus