libnm-core/tests: fix bit shift

Use a maximum shift amount of 63 for guint64.

Fixes: 0a3c1f5774
(cherry picked from commit ac78c18855)
This commit is contained in:
Beniamino Galvani 2015-11-15 11:13:41 +01:00
parent 18770ece53
commit 46f741cce4

View file

@ -4284,7 +4284,7 @@ again:
* by randomly setting bits. */
numbits = g_rand_int_range (rand, 1, 65);
while (xno != ~((guint64) 0) && numbits > 0) {
guint64 v = (1LL << g_rand_int_range (rand, 0, 65));
guint64 v = (1LL << g_rand_int_range (rand, 0, 64));
if ((xno | v) != xno) {
xno |= v;