Fix Com_RandomBytes weak-random case

255 is valid for unsigned char too.
This commit is contained in:
/dev/humancontroller 2015-03-20 18:50:04 -05:00 committed by Zack Middleton
parent 40cfbc9a82
commit c4a2836269
1 changed files with 1 additions and 1 deletions

View File

@ -3552,7 +3552,7 @@ void Com_RandomBytes( byte *string, int len )
Com_Printf( "Com_RandomBytes: using weak randomization\n" ); Com_Printf( "Com_RandomBytes: using weak randomization\n" );
for( i = 0; i < len; i++ ) for( i = 0; i < len; i++ )
string[i] = (unsigned char)( rand() % 255 ); string[i] = (unsigned char)( rand() % 256 );
} }