diff --git a/src/core/FileSystem.cpp b/src/core/FileSystem.cpp index f03b21f..6e87838 100644 --- a/src/core/FileSystem.cpp +++ b/src/core/FileSystem.cpp @@ -187,7 +187,7 @@ char *bc_file_minecraft_directory() { struct passwd *pw = getpwuid(getuid()); int size = strlen(pw->pw_dir) + strlen("/.minecraft/") + 1; - mcdir = malloc(size); + mcdir = (char*)malloc(size); snprintf(mcdir, size, "%s/.minecraft/", pw->pw_dir); #elif _WIN32 char *env = getenv("APPDATA"); diff --git a/src/core/Logger.cpp b/src/core/Logger.cpp index 92bf48c..0787831 100644 --- a/src/core/Logger.cpp +++ b/src/core/Logger.cpp @@ -15,8 +15,8 @@ void bc_log(const char *format, ...) { FILE *file = NULL; file = fopen("betacraft.log", "a"); - va_list args = NULL; - va_list args2 = NULL; + va_list args = {}; + va_list args2 = {}; va_start(args, format); va_copy(args2, args);