Only call isqrt32() with a positive argument
Fixes test_opus_projection failure under ubsan, due to clz(0).
This commit is contained in:
parent
287cb030ab
commit
697beca22d
3 changed files with 12 additions and 7 deletions
|
@ -38,7 +38,8 @@
|
|||
#include "mathops.h"
|
||||
|
||||
/*Compute floor(sqrt(_val)) with exact arithmetic.
|
||||
This has been tested on all possible 32-bit inputs.*/
|
||||
_val must be greater than 0.
|
||||
This has been tested on all possible 32-bit inputs greater than 0.*/
|
||||
unsigned isqrt32(opus_uint32 _val){
|
||||
unsigned b;
|
||||
unsigned g;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue