diff options
author | Paul Gilbert | 2019-07-20 18:12:56 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-09-29 15:08:52 -0700 |
commit | 30bf05479a8d4b9e63b243b0f1acac3fb946da32 (patch) | |
tree | 8bfde20656eef49ad0a167cf31318c78a8b8201c /engines/glk/quest/geas_glk.cpp | |
parent | 255f2b4c82867b3c113743d02cf91b91a15176bd (diff) | |
download | scummvm-rg350-30bf05479a8d4b9e63b243b0f1acac3fb946da32.tar.gz scummvm-rg350-30bf05479a8d4b9e63b243b0f1acac3fb946da32.tar.bz2 scummvm-rg350-30bf05479a8d4b9e63b243b0f1acac3fb946da32.zip |
GLK: QUEST: Added detection entries
Diffstat (limited to 'engines/glk/quest/geas_glk.cpp')
-rw-r--r-- | engines/glk/quest/geas_glk.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/glk/quest/geas_glk.cpp b/engines/glk/quest/geas_glk.cpp index 8f48799d9a..571be78edc 100644 --- a/engines/glk/quest/geas_glk.cpp +++ b/engines/glk/quest/geas_glk.cpp @@ -116,8 +116,8 @@ void GeasGlkInterface::set_background(String s) { * GeasInterface? */ String GeasGlkInterface::get_file(const String &fname) const { - Common::File ifs; - if (ifs.open(fname)) { + Common::File f; + if (!f.open(fname)) { glk_put_cstring("Couldn't open "); glk_put_cstring(fname.c_str()); g_vm->glk_put_char(0x0a); @@ -125,10 +125,10 @@ String GeasGlkInterface::get_file(const String &fname) const { } // Read entirety of the file - char *buf = new char[ifs.size()]; - ifs.read(buf, ifs.size()); + char *buf = new char[f.size()]; + f.read(buf, f.size()); - String result(buf, buf + ifs.size()); + String result(buf, buf + f.size()); delete[] buf; return result; |