Fix another oversight

This commit is contained in:
theoddone33
2001-04-23 00:50:08 +00:00
parent 9a7e3a303a
commit 4117b25da4

View File

@@ -466,7 +466,7 @@ void obtaindir()
homedir = (char *)malloc(128); homedir = (char *)malloc(128);
getcwd(homedir, 128); getcwd(homedir, 128);
} }
cfgdir = (char *)malloc(strlen(homedir)+strlen("/.zsnes")); cfgdir = (char *)malloc(strlen(homedir)+strlen("/.zsnes")+1);
strcpy(cfgdir, homedir); strcpy(cfgdir, homedir);
strcat(cfgdir, "/.zsnes"); strcat(cfgdir, "/.zsnes");
tmp = opendir(cfgdir); tmp = opendir(cfgdir);