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
This commit is contained in:
Pasi Kallinen 2007-06-11 19:40:51 +00:00
parent 7b3bcd72d7
commit abb8f106f6

View File

@ -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);