1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

Fix sign compare bug introduced when rnum() was redefined to use

arc4random_uniform().  From pjanzen@, OK deraadt@
This commit is contained in:
millert 2015-05-20 20:26:00 +00:00
parent d7c22ab584
commit 637ecc7985

View File

@ -1,4 +1,4 @@
/* $OpenBSD: extra.c,v 1.6 2009/10/27 23:59:23 deraadt Exp $ */
/* $OpenBSD: extra.c,v 1.7 2015/05/20 20:26:00 millert Exp $ */
/*
* Copyright (c) 1980, 1993
@ -165,7 +165,7 @@ dblgood()
#endif
/* double if 2-3 moves ahead */
if (n > 10 + rnum(7))
if (n > (int)(10 + rnum(7)))
return(1);
return(0);
}