mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 19:21:46 +00:00
Made readFileToMem() print a more useful error message than "File is not open"
if the file could not be opened. svn-id: r21508
This commit is contained in:
parent
f991b88da8
commit
c26b762f48
@ -597,7 +597,8 @@ void Insane::readFileToMem(const char *name, byte **buf) {
|
||||
ScummFile in;
|
||||
uint32 len;
|
||||
|
||||
_vm->openFile(in, name);
|
||||
if (!_vm->openFile(in, name))
|
||||
error("Cannot open file %s", name);
|
||||
len = in.size();
|
||||
*buf = (byte *)malloc(len);
|
||||
in.read(*buf, len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user