From 9bb87b9b6d1a0bfb9fb67addec4de78489bc14fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AF=E8=83=BD=E5=BE=88=E5=BB=A2?= Date: Fri, 12 Jan 2024 10:20:44 +0800 Subject: [PATCH] :art: Resolve potential undefined behavior --- src/kawashima/hca/internal/CHcaChannel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kawashima/hca/internal/CHcaChannel.cpp b/src/kawashima/hca/internal/CHcaChannel.cpp index b38f4fa..422a25b 100644 --- a/src/kawashima/hca/internal/CHcaChannel.cpp +++ b/src/kawashima/hca/internal/CHcaChannel.cpp @@ -217,7 +217,8 @@ void CHcaChannel::Decode4( float *d = &inst2->block[b]; for (uint32_t i = 0; i < a; i++) { *(d++) = *s * f2; - *(s++) = *s * f1; + *s = *s * f1; + ++s; } } }