GLK: ADVSYS: Fix parsing input words

This commit is contained in:
Paul Gilbert 2019-06-14 21:40:07 -07:00
parent 5f7955daa5
commit f7e389db3b
2 changed files with 7 additions and 6 deletions

View File

@ -50,12 +50,13 @@ Common::String GlkInterface::readLine() {
glk_select(&ev);
if (ev.type == evtype_Quit)
return "";
else if (ev.type == evtype_LineInput)
break;
else if (ev.type == evtype_LineInput) {
line[ev.val1] = '\0';
return Common::String(line);
}
} while (!shouldQuit() && ev.type != evtype_Quit);
line[199] = '\0';
return Common::String(line);
return "";
}
} // End of namespace AdvSys

View File

@ -590,11 +590,11 @@ bool VM::getWord(Common::String &line) {
if (iw._number) {
_words.push_back(iw);
return false;
return true;
} else {
Common::String msg = Common::String::format(_("I don't know the word \"%s\".\n"), iw._text.c_str());
print(msg);
return true;
return false;
}
}