RandomWord should be unsigned

This commit is contained in:
nukeykt 2019-12-03 07:12:32 +09:00 committed by Christoph Oelckers
parent a0dac5e035
commit 0a4129ff56
2 changed files with 3 additions and 2 deletions

View File

@ -54,7 +54,7 @@ char RandomByte()
return randByte;
}
short RandomWord()
uint16_t RandomWord()
{
short randWord = RandomByte() << 8;
randWord |= RandomByte();

View File

@ -18,13 +18,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef __random_h__
#define __random_h__
#include "compat.h"
BEGIN_PS_NS
void InitRandom();
int RandomBit();
char RandomByte();
short RandomWord();
uint16_t RandomWord();
int RandomLong();
int RandomSize(int nSize);