aboutsummaryrefslogtreecommitdiff
path: root/pixman/test/stress-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/test/stress-test.c')
-rw-r--r--pixman/test/stress-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pixman/test/stress-test.c b/pixman/test/stress-test.c
index 08bf1d4df..3174621e6 100644
--- a/pixman/test/stress-test.c
+++ b/pixman/test/stress-test.c
@@ -166,7 +166,8 @@ fake_reader (const void *src, int size)
uint32_t r = lcg_rand_u32 ();
assert (size == 1 || size == 2 || size == 4);
- return r & ((1 << (size * 8)) - 1);
+
+ return r >> (32 - (size * 8));
}
static void