From 5ae62791ae1e39e0d9c1afe67f57549c2cb4ae63 Mon Sep 17 00:00:00 2001 From: Tom M Date: Fri, 6 Oct 2017 13:15:09 +0200 Subject: [PATCH] dont hardcode buf size --- src/fluidsynth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fluidsynth.c b/src/fluidsynth.c index 3c1f290e..dd813c5d 100644 --- a/src/fluidsynth.c +++ b/src/fluidsynth.c @@ -695,9 +695,9 @@ int main(int argc, char** argv) /* try to load the user or system configuration */ if (config_file != NULL) { fluid_source(cmd_handler, config_file); - } else if (fluid_get_userconf(buf, 512) != NULL) { + } else if (fluid_get_userconf(buf, sizeof(buf)*sizeof(buf[0])) != NULL) { fluid_source(cmd_handler, buf); - } else if (fluid_get_sysconf(buf, 512) != NULL) { + } else if (fluid_get_sysconf(buf, sizeof(buf)*sizeof(buf[0])) != NULL) { fluid_source(cmd_handler, buf); }