From 8865adaceadfff3dc9103f1f5f9e29365936cc8d Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Fri, 20 Mar 2015 18:50:04 -0500 Subject: Fix Com_RandomBytes weak-random case 255 is valid for unsigned char too. --- src/qcommon/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qcommon/common.c b/src/qcommon/common.c index 74df47ba..fef14331 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -3388,7 +3388,7 @@ void Com_RandomBytes( byte *string, int len ) Com_Printf( "Com_RandomBytes: using weak randomization\n" ); for( i = 0; i < len; i++ ) - string[i] = (unsigned char)( rand() % 255 ); + string[i] = (unsigned char)( rand() % 256 ); } -- cgit