get some single source instruction formats right and handle empty paths

properly
This commit is contained in:
Bill Currie 2003-08-05 17:27:47 +00:00
parent ada828bdc9
commit cbc6c40d33
2 changed files with 12 additions and 1 deletions

View file

@ -148,7 +148,7 @@ PR_Load_Source_File (progs_t *pr, const char *fname)
int len;
len = strlen (*dir) + strlen (fname) + 2;
path = Hunk_TempAlloc (len);
sprintf (path, "%s/%s", *dir, fname);
sprintf (path, "%s%s%s", *dir, **dir ? "/" : "", fname);
f->text = pr->load_file (pr, path);
}
if (!f->text) {