sanitizer: prevent sub that result in negative unsigned result

This commit is contained in:
Antoine SOULIER
2022-05-13 10:22:51 +02:00
parent 72d868b755
commit aa9eb7b234

View File

@@ -147,7 +147,7 @@ static inline int32_t fast_db_q16(float x)
union { float f; uint32_t u; } x2 = { .f = x*x };
int e2 = (x2.u >> 22) - 2*127;
int e2 = (int)(x2.u >> 22) - 2*127;
int hi = (x2.u >> 18) & 0x1f;
int lo = (x2.u >> 2) & 0xffff;