From 7ca404adab483820ed7d43e961fef91d2e978f90 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 21 Aug 2000 23:31:38 +0000 Subject: Update. * stdlib/random_r.c (__setstate_r): Correct offset when computing new rptr and fptr. Reported by Michael Fischer . * posix/regex.h: Add macro definitions to allow compiling outside glibc. --- stdlib/random_r.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stdlib') diff --git a/stdlib/random_r.c b/stdlib/random_r.c index 27573b3b05..1d9e56f19b 100644 --- a/stdlib/random_r.c +++ b/stdlib/random_r.c @@ -295,8 +295,8 @@ __setstate_r (arg_state, buf) if (type != TYPE_0) { int rear = new_state[0] / MAX_TYPES; - buf->rptr = &new_state[rear]; - buf->fptr = &new_state[(rear + separation) % degree]; + buf->rptr = &new_state[1 + rear]; + buf->fptr = &new_state[1 + (rear + separation) % degree]; } buf->state = &new_state[1]; /* Set end_ptr too. */ -- cgit v1.2.3