VC fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2714 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -187,9 +187,9 @@ char *loadfile(const char *fn, int *size, const char *mode)
|
||||
char *buf = new char[len+1];
|
||||
if(!buf) { fclose(f); return NULL; }
|
||||
buf[len] = 0;
|
||||
size_t rlen = fread(buf, 1, len, f);
|
||||
int rlen = (int)fread(buf, 1, len, f);
|
||||
fclose(f);
|
||||
if(size_t(len)!=rlen && (!mode || strchr(mode, 'b')))
|
||||
if(len!=rlen && (!mode || strchr(mode, 'b')))
|
||||
{
|
||||
delete[] buf;
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user