From 80dedbd75159292dceea87bab4c5b90fd1bdd33e Mon Sep 17 00:00:00 2001 From: dusanx Date: Tue, 28 Apr 2009 10:33:29 +0200 Subject: Possible Debian segfault fix --- uzbl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'uzbl.c') diff --git a/uzbl.c b/uzbl.c index 8eefe84..ee10237 100644 --- a/uzbl.c +++ b/uzbl.c @@ -520,8 +520,9 @@ settings_init () { printf("XDG_CONFIG_DIRS: %s\n", XDG_CONFIG_DIRS); - char *dirs = XDG_CONFIG_DIRS; - char *dir = (char *)strtok (dirs, ":"); + char buffer[512]; + strcpy (buffer, XDG_CONFIG_DIRS); + const gchar* dir = strtok (buffer, ":"); while (dir && ! file_exists (conf)) { strcpy (conf, dir); strcat (conf, "/uzbl/config"); @@ -529,7 +530,7 @@ settings_init () { printf ("Config file %s found.\n", conf); config_file = &conf[0]; } - dir = (char *)strtok (NULL, ":"); + dir = strtok (NULL, ":"); } } } -- cgit v1.2.3