summary refs log tree commit diff
path: root/stdlib/random_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/random_r.c')
-rw-r--r--stdlib/random_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/random_r.c b/stdlib/random_r.c
index 9a74451cc6..27573b3b05 100644
--- a/stdlib/random_r.c
+++ b/stdlib/random_r.c
@@ -285,7 +285,7 @@ __setstate_r (arg_state, buf)
     old_state[-1] = (MAX_TYPES * (buf->rptr - old_state)) + old_type;
 
   type = new_state[0] % MAX_TYPES;
-  if (type < TYPE_0 || type >= TYPE_4)
+  if (type < TYPE_0 || type > TYPE_4)
     goto fail;
 
   buf->rand_deg = degree = random_poly_info.degrees[type];