summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.c b/random.c
index bfdfaf6f3c..7aefb4d4fb 100644
--- a/random.c
+++ b/random.c
@@ -98,7 +98,7 @@ init_genrand(struct MT *mt, unsigned int s)
mt->state[j] &= 0xffffffff; /* for >32 bit machines */
}
mt->left = 1;
- mt->next = mt->state + N - 1;
+ mt->next = mt->state + N;
}
/* initialize by an array with array-length */