From: Christian Heller Date: Sun, 8 Sep 2013 14:15:56 +0000 (+0200) Subject: Fixed memory handling bug. X-Git-Tag: tce~966 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_free?a=commitdiff_plain;h=6f9c0f49233065ed1ce0bae8862902e3cead639e;p=plomrogue Fixed memory handling bug. --- diff --git a/src/wincontrol.c b/src/wincontrol.c index 5ebc057..a9f8017 100644 --- a/src/wincontrol.c +++ b/src/wincontrol.c @@ -304,7 +304,7 @@ extern void init_winconfs(struct World * world) winconf_ids[i] = '\0'; exit_err(errno, world, err_r); exit_err(closedir(dp), world, err_c); - world->winconf_ids = try_malloc(strlen(winconf_ids + 1), world, f_name); + world->winconf_ids = try_malloc(strlen(winconf_ids) + 1, world, f_name); memcpy(world->winconf_ids, winconf_ids, strlen(winconf_ids) + 1); free(winconf_ids);