mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
abd54cad61
commit
9052035548
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ static int number_of_file(char *path)
|
||||||
|
|
||||||
static char *build_filename(const char *path, const char *name)
|
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);
|
char *buf = malloc(len);
|
||||||
#if WIN32
|
#if WIN32
|
||||||
snprintf(buf, len, "%s\%s", path, name);
|
snprintf(buf, len, "%s\%s", path, name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue