diff --git a/tests/checkasm/lpc.c b/tests/checkasm/lpc.c index 49e608f8c1..2823953878 100644 --- a/tests/checkasm/lpc.c +++ b/tests/checkasm/lpc.c @@ -22,12 +22,12 @@ #include "checkasm.h" -#define randomize_int32(buf, len) \ - do { \ - for (int i = 0; i < len; i++) { \ - int32_t f = rnd() >> 8; \ - buf[i] = f; \ - } \ +#define randomize_int32(buf, len) \ + do { \ + for (int i = 0; i < len; i++) { \ + int32_t f = (UINT32_MAX >> 8) - (rnd() >> 16); \ + buf[i] = f; \ + } \ } while (0) #define EPS 0.005