From 83290e32ea1c5772d986f2b9a419b5b6ac0dce29 Mon Sep 17 00:00:00 2001 From: Spencer Vaughn Date: Wed, 29 Nov 2023 19:08:12 -0600 Subject: [PATCH] removed unused malloc call in windows implementation --- .DS_Store | Bin 14340 -> 14340 bytes src/filehelper.c | 12 +----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.DS_Store b/.DS_Store index 4d3af91ae46f7c247b759194dee4b04f5e46ae05..6f395dbba25d4fa8639e06b6c0d25482a7a108e5 100644 GIT binary patch delta 25 gcmZoEXeromK#;@2$U;ZK*u-oyzqI{kcA>wj0B-6B=Kufz delta 23 ecmZoEXeromK#saves_file_path[num_saves] = malloc(strlen(full_path) + 1); strcpy(save_data->saves_file_path[num_saves], full_path); - printf("Saved file: %s\n", save_data->saves_file_path[num_saves]); num_saves++; } while (FindNextFile(hFind, &find_file_data) != 0); FindClose(hFind); save_data->num_saves = num_saves; - printf("num_saves from load: %d\n", save_data->num_saves); } return 0; @@ -140,7 +136,6 @@ void create_default_config(void) LPCSTR ini = config_path; WritePrivateProfileStringA("app", "SAVE_FILE_DIR", saves_dir, ini); - WritePrivateProfileStringA("app", "DISABLE_RANDOM_IVS_ON_TRADE", "false", ini); } struct config_data read_key_from_config(void) { @@ -160,13 +155,8 @@ struct config_data read_key_from_config(void) char save_file_str[MAX_FILE_PATH_CHAR]; GetPrivateProfileString("app", "SAVE_FILE_DIR", 0, save_file_str, MAX_FILE_PATH_CHAR, ini); - char disable_random_ivs_on_trade[MAX_FILE_PATH_CHAR]; - GetPrivateProfileString("app", "DISABLE_RANDOM_IVS_ON_TRADE", 0, disable_random_ivs_on_trade, MAX_FILE_PATH_CHAR, ini); - - return (struct config_data){ - .save_file_dir = save_file_str, - .disable_random_ivs_on_trade = disable_random_ivs_on_trade, + .save_file_dir = save_file_str }; } void write_to_log(const char *msg, const uint8_t message_type)