[iortcw] 317/497: All: Fix Com_RandomBytes weak-random case
Simon McVittie
smcv at debian.org
Wed Sep 21 19:48:45 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.42d
in repository iortcw.
commit 1c76a907895356a8cbe96ddaa0cefb3d6557e99e
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Sun Mar 22 06:04:04 2015 -0400
All: Fix Com_RandomBytes weak-random case
---
MP/code/qcommon/common.c | 2 +-
SP/code/qcommon/common.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/MP/code/qcommon/common.c b/MP/code/qcommon/common.c
index 54a711f..fecaac2 100644
--- a/MP/code/qcommon/common.c
+++ b/MP/code/qcommon/common.c
@@ -3638,7 +3638,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 );
}
diff --git a/SP/code/qcommon/common.c b/SP/code/qcommon/common.c
index 34b496f..6988ba3 100644
--- a/SP/code/qcommon/common.c
+++ b/SP/code/qcommon/common.c
@@ -3179,7 +3179,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 );
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list