From b9d98efc0bc1356a31579d1e9fd490b4569d2820 Mon Sep 17 00:00:00 2001 From: Jakob Fries Date: Sun, 5 Aug 2007 15:58:26 +0000 Subject: [PATCH] ~ resolved at config save --- src/engine/config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/config.cpp b/src/engine/config.cpp index fb3781906..40fbda204 100644 --- a/src/engine/config.cpp +++ b/src/engine/config.cpp @@ -66,12 +66,12 @@ void config_set(const char *line) void config_load(const char *filename) { + char full_path[1024]; if (filename[0] == '~') { char *home = getenv("HOME"); if (home) { - char full_path[1024]; sprintf(full_path, "%s%s", home, filename+1); filename = full_path; } @@ -96,12 +96,12 @@ void config_load(const char *filename) void config_save(const char *filename) { + char full_path[1024]; if (filename[0] == '~') { char *home = getenv("HOME"); if (home) { - char full_path[1024]; sprintf(full_path, "%s%s", home, filename+1); filename = full_path; }