[Fix] time(NULL) segfaulting stuff.

This commit is contained in:
Tamir Atias 2013-02-17 02:50:37 +02:00
parent 1f59163010
commit 61f1069542
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ typedef struct LG {
static unsigned int makeseed (lua_State *L) { static unsigned int makeseed (lua_State *L) {
char buff[4 * sizeof(size_t)]; char buff[4 * sizeof(size_t)];
unsigned int h = rand(); unsigned int h = luai_makeseed();
int p = 0; int p = 0;
addbuff(buff, p, L); /* heap variable */ addbuff(buff, p, L); /* heap variable */
addbuff(buff, p, &h); /* local variable */ addbuff(buff, p, &h); /* local variable */

View File

@ -33,7 +33,7 @@
#define FONT_SIZE 12 #define FONT_SIZE 12
static int quit = 0; // Primary loop. static int quit = 0; // Primary loop.
unsigned int time = 0; // Calculate FPS and movement. static unsigned int time = 0; // Calculate FPS and movement.
static char version[VERSION_LEN]; static char version[VERSION_LEN];
// Just some default crap. // Just some default crap.