Skip to content

Commit

Permalink
Merge pull request #157 from kanurag94/quick-fix-crash
Browse files Browse the repository at this point in the history
Fix crashes on blank recording
  • Loading branch information
kanurag94 authored May 16, 2020
2 parents f4c96c4 + f9b2a3a commit 4f9de72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/xstdio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ xio_path xio_getdirectory(xio_constpath filename)

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

0 comments on commit 4f9de72

Please sign in to comment.