Added null checks for malloc

This commit is contained in:
2025-03-30 22:24:56 +03:00
parent 0e992c3be5
commit 1dc0040fb3
5 changed files with 39 additions and 7 deletions

View File

@@ -2,6 +2,7 @@
#define UTILS_H_
#include <time.h>
#include "../globals.h"
extern boardInfo brdInfo;
@@ -10,5 +11,6 @@ int randomInt(const int start, const int end, const unsigned int seed);
int randomX(const clock_t initClock);
int randomY(const clock_t initClock);
void sleep_ms(const int ms);
void mallocError(const char* varName, const char* fileName, const char* functionName);
#endif // UTILS_H_