1
0
Fork 0
forked from fte/fteqw

Fixes an issue that could only ever happen with mvdsv.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2013 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-02-22 23:51:59 +00:00
parent 30fa877587
commit 329f0ca9bf

View file

@ -167,6 +167,9 @@ unsigned char *ReadFile_WINDOWSSUCKS(char *gamedir, char *filename, int *size)
FILE *f;
char fname[1024];
if (!*filename)
return NULL;
//try and read it straight out of the file system
sprintf(fname, "%s/%s", gamedir, filename);
f = fopen(fname, "rb");
@ -212,7 +215,7 @@ bsp_t *BSP_LoadModel(cluster_t *cluster, char *gamedir, char *bspname)
bsp_t *bsp;
if (!gamedir)
if (!gamedir || !*gamedir)
gamedir = "qw";
data = ReadFile_WINDOWSSUCKS(gamedir, bspname, &size);