Fix stupid off by one error

This was missing the space for the \0 character so the paths were one byte
short.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-11-07 13:06:06 +09:00
parent abd54cad61
commit 9052035548

View file

@ -156,7 +156,7 @@ static int number_of_file(char *path)
static char *build_filename(const char *path, const char *name)
{
int len = strlen(path) + strlen(name) + 1;
int len = strlen(path) + strlen(name) + 2;
char *buf = malloc(len);
#if WIN32
snprintf(buf, len, "%s\%s", path, name);