mirror of
https://github.com/aap/librw.git
synced 2024-11-25 05:05:42 +00:00
don't barf when when getFileContents can't open file
This commit is contained in:
parent
efc0c307d7
commit
92b215268a
@ -1107,7 +1107,8 @@ uint8*
|
||||
getFileContents(const char *name, uint32 *len)
|
||||
{
|
||||
FILE *cf = fopen(name, "rb");
|
||||
assert(cf != nil);
|
||||
if(cf == nil)
|
||||
return nil;
|
||||
fseek(cf, 0, SEEK_END);
|
||||
*len = ftell(cf);
|
||||
fseek(cf, 0, SEEK_SET);
|
||||
|
Loading…
Reference in New Issue
Block a user