Implement deque, fix luaconsole
This commit is contained in:
@@ -80,10 +80,11 @@ void LuaConsole::add(std::string line) {
|
||||
int status = luaL_loadbuffer(lua_state_, partial.c_str(), partial.size(), "=stdin");
|
||||
if (status == LUA_ERRSYNTAX)
|
||||
{
|
||||
const char *eof = "'<eof>'";
|
||||
const char *eof = "<eof>";
|
||||
int leof = strlen(eof);
|
||||
size_t lmsg;
|
||||
const char *msg = lua_tolstring(lua_state_, -1, &lmsg);
|
||||
const char *tp = msg + lmsg - (sizeof(eof) - 1);
|
||||
const char *tp = msg + lmsg - leof;
|
||||
if (strstr(msg, eof) == tp) {
|
||||
action_ = DO_NOTHING;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user