tests/checkasm/lpc: correct arithmetic when randomizing buffers

Results weren't signed.
This commit is contained in:
Lynne 2022-09-23 01:48:00 +02:00
parent 6ad39f01df
commit 668f43af20
Signed by: Lynne
GPG key ID: A2FEA5F03F034464

View file

@ -25,7 +25,7 @@
#define randomize_int32(buf, len) \
do { \
for (int i = 0; i < len; i++) { \
int32_t f = (UINT32_MAX >> 8) - (rnd() >> 16); \
int32_t f = ((int)(UINT32_MAX >> 17)) - ((int)(rnd() >> 16)); \
buf[i] = f; \
} \
} while (0)