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:
Torbjörn Andersson 2006-03-31 06:42:56 +00:00
parent f991b88da8
commit c26b762f48

View File

@ -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);