diff options
author | Lynne <dev@lynne.ee> | 2022-09-23 01:48:00 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2022-09-23 01:50:59 +0200 |
commit | 668f43af2004af92e2df4f8633e7fc3602975073 (patch) | |
tree | bd55c0fc2607e4ff8a4a2f6871c02bf6831cdb8c /tests/checkasm/lpc.c | |
parent | 6ad39f01dfb3ed7d7bbebac3924797966ad99dbf (diff) | |
download | ffmpeg-668f43af2004af92e2df4f8633e7fc3602975073.tar.gz |
tests/checkasm/lpc: correct arithmetic when randomizing buffers
Results weren't signed.
Diffstat (limited to 'tests/checkasm/lpc.c')
-rw-r--r-- | tests/checkasm/lpc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/checkasm/lpc.c b/tests/checkasm/lpc.c index 2823953878..592e34c03d 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 = (UINT32_MAX >> 8) - (rnd() >> 16); \ - buf[i] = f; \ - } \ +#define randomize_int32(buf, len) \ + do { \ + for (int i = 0; i < len; i++) { \ + int32_t f = ((int)(UINT32_MAX >> 17)) - ((int)(rnd() >> 16)); \ + buf[i] = f; \ + } \ } while (0) #define EPS 0.005 |