summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-06-02 18:39:29 -0400
committerCharadon <dev@iotib.net>2022-06-02 18:39:29 -0400
commitd1d13216310c7ebb23f99459e21905393d02b839 (patch)
treef70eee8aa27cf25e90e08aec1c930413df87c5c8 /src/main.c
parent2dd8b8b6e66aa7e47da42912b0ca07ed8d7f0c23 (diff)
downloadPong-C-d1d13216310c7ebb23f99459e21905393d02b839.tar.gz
Fixed some bugs and a segfault v0.2
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index a638248..56fda9d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -5,7 +5,7 @@
 int Difficulty = 1;
 atomic_int Ticks = 0;
 bool GameGoing = true;
-char *VersionString;
+char VersionString[256];
 
 mtx_t AudioQueueBeingModified;
 
@@ -105,7 +105,7 @@ int main() {
 	SetWindowMinSize(1280, 720);
 
 	//Init Variables
-	strcpy(VersionString, "Version 0.2 - AEOLUS");
+	strncpy(VersionString, "Version 0.2 - AEOLUS", sizeof(VersionString));
 	
 	//Populate Audio Queue
 	for(unsigned int i = 0; i < 20; i++) {
@@ -137,6 +137,7 @@ int main() {
 	
 	GameGoing = false; // Make sure the game is going to end.
 	thrd_join(AudioThread, NULL);
+	thrd_join(InternalClock, NULL);
 	CloseWindow();
 	return(0);
 }