From 5cf4d7f91541a6f136153f4537f7abc9a336c45b Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Tue, 9 Nov 2021 16:26:02 -0500 Subject: [PATCH] Small Cleanup --- mods/src/home/home.c | 5 +---- mods/src/input/attack.c | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mods/src/home/home.c b/mods/src/home/home.c index 5edbafb..f502309 100644 --- a/mods/src/home/home.c +++ b/mods/src/home/home.c @@ -13,16 +13,13 @@ #define NEW_PATH "" // Store Launch Directory -static char *get_launch_directory() { +__attribute__((constructor)) static char *get_launch_directory() { static char *launch_directory = NULL; if (launch_directory == NULL) { launch_directory = getcwd(NULL, 0); } return launch_directory; } -__attribute__((constructor)) static void init_launch_directory() { - get_launch_directory(); -} __attribute__((destructor)) static void free_launch_directory() { free(get_launch_directory()); } diff --git a/mods/src/input/attack.c b/mods/src/input/attack.c index c23c538..38d4e91 100644 --- a/mods/src/input/attack.c +++ b/mods/src/input/attack.c @@ -33,6 +33,7 @@ static int32_t MouseBuildInput_tickBuild_injection(unsigned char *mouse_build_in is_left_click = 2; } + // Return return ret; }