Skip to content

Commit

Permalink
Use dynamic filepath allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
kanurag94 committed May 16, 2020
1 parent 39538c4 commit bc6ebf6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util/xstdio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ xio_path xio_getdirectory(xio_constpath filename)

xio_path xio_getfilename(const char *basename, const char *extension)
{
static char name[80];
int pathlength = sizeof(basename) + sizeof(extension);
static char* name;
name = (char* )malloc(pathlength * sizeof (char));
int nimage = 0;
struct stat sb;
char *base = xio_fixpath(basename);
Expand Down

0 comments on commit bc6ebf6

Please sign in to comment.