git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2714 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-09-20 17:21:27 +00:00
parent c01d40f4ab
commit a0b8295182
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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;