From abb8f106f6a4c4e7708c7b499ec20c603abaebe3 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 11 Jun 2007 19:40:51 +0000 Subject: [PATCH] Fix a bug; inprogress-dir is now configurable, so use that string length for str alloc instead of assuming it's 11 chars. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@361 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- dgamelaunch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dgamelaunch.c b/dgamelaunch.c index 7a83ce8..bf3382e 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -1494,7 +1494,7 @@ purge_stale_locks (int game) if (strncmp (dent->d_name, me->username, colon - dent->d_name)) continue; - len = strlen (dent->d_name) + strlen(globalconfig.dglroot) + 12; + len = strlen (dent->d_name) + strlen(globalconfig.dglroot) + strlen(myconfig[game]->inprogressdir) + 1; fn = malloc (len); snprintf (fn, len, "%s%s%s", globalconfig.dglroot, myconfig[game]->inprogressdir, dent->d_name);