tests/checkasm/lpc: correct arithmetic when randomizing buffers

Results weren't signed.
pull/388/head
Lynne 2 years ago
parent 6ad39f01df
commit 668f43af20
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
  1. 12
      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

Loading…
Cancel
Save