medfall

A super great game engine
Log | Files | Refs

commit ad69870125f9d260a4d667396d469b8662c089ad
parent 6af1005188a73ccb84cff33851bf5f76b9ada61d
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun, 11 Mar 2018 12:22:51 +0200

Fix ggentropy

Diffstat:
ggentropy.cc | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ggentropy.cc b/ggentropy.cc @@ -43,8 +43,8 @@ bool ggentropy( void * buf, size_t n ) { bool ggentropy( void * buf, size_t n ) { ASSERT( n <= 256 ); - int ok = getrandom( buf, n, 0 ); - if( ok == 0 ) + ssize_t ok = getrandom( buf, n, 0 ); + if( ok >= 0 && size_t( ok ) == n ) return true; if( errno != ENOSYS )