summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2015-03-20 18:50:04 -0500
committerTim Angus <tim@ngus.net>2015-06-07 12:03:35 +0100
commit8865adaceadfff3dc9103f1f5f9e29365936cc8d (patch)
treef8ba29650cabc75cf4951e10c6503db3ad57f2b4
parent00d34bbe6b0731f743677dfc7242b7b39c20f230 (diff)
Fix Com_RandomBytes weak-random case
255 is valid for unsigned char too.
-rw-r--r--src/qcommon/common.c2
1 files changed, 1 insertions, 1 deletions
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 );
}