From 5f720dfdb12a08e115efa0ca601e594a82d81838 Mon Sep 17 00:00:00 2001 From: Nikola Pavlica Date: Fri, 10 Jul 2020 20:53:58 +0200 Subject: [PATCH] [fix] random wanrings due to sloppy code --- src/config.c | 2 +- src/shared.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 84fd637a..340dda31 100644 --- a/src/config.c +++ b/src/config.c @@ -81,7 +81,7 @@ void appendSupported(struct supported *support, char *appendName, int appendNum) const char **names = realloc(support->names, (++support->count)*sizeof(char*)); names[support->count-1] = appendName; support->names=names; - int *numbers = realloc(support->numbers, support->count*sizeof(int*)); + int *numbers = realloc(support->numbers, support->count*sizeof(int)); numbers[support->count-1] = appendNum; support->numbers=numbers; } diff --git a/src/shared.c b/src/shared.c index 7cef8fc7..3c385912 100644 --- a/src/shared.c +++ b/src/shared.c @@ -60,6 +60,7 @@ int xavaMkdir(char *dir) { if (errno != EEXIST) return -1; } + return 0; } int xavaGetConfigDir(char *configPath) {