Ensure buf2 is in scope

This commit is contained in:
sjg 2017-05-10 22:24:09 +00:00
parent 0cfdb3c305
commit 6bd7f2ed42

View File

@ -751,6 +751,7 @@ Main_SetObjdir(const char *fmt, ...)
struct stat sb;
char *path;
char buf[MAXPATHLEN + 1];
char buf2[MAXPATHLEN + 1];
Boolean rc = FALSE;
va_list ap;
@ -759,8 +760,6 @@ Main_SetObjdir(const char *fmt, ...)
va_end(ap);
if (path[0] != '/') {
char buf2[MAXPATHLEN + 1];
snprintf(buf2, MAXPATHLEN, "%s/%s", curdir, path);
path = buf2;
}