From d6117ee54aabf012241d7aac9f8955789f0db7c2 Mon Sep 17 00:00:00 2001 From: Syping Date: Mon, 27 Jul 2020 17:11:34 +0200 Subject: [PATCH] fix eIOBytesAvailable and eIOCanReadLine --- src/luaengineio/luaengine/LuaEngineIO.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/luaengineio/luaengine/LuaEngineIO.cpp b/src/luaengineio/luaengine/LuaEngineIO.cpp index ca1d168..97e74e6 100644 --- a/src/luaengineio/luaengine/LuaEngineIO.cpp +++ b/src/luaengineio/luaengine/LuaEngineIO.cpp @@ -97,7 +97,7 @@ int LuaEngineIO::checkFileExists(lua_State *L_p) int LuaEngineIO::eIOBytesAvailable(lua_State *L_p) { - if (getArgumentCount(L_p) >= 2) { + if (getArgumentCount(L_p) >= 1) { void *pointer = getPointer(L_p, 1); if (pointer != NULL) { if (((QObject*)pointer)->inherits("QIODevice")) { @@ -111,7 +111,7 @@ int LuaEngineIO::eIOBytesAvailable(lua_State *L_p) int LuaEngineIO::eIOCanReadLine(lua_State *L_p) { - if (getArgumentCount(L_p) >= 2) { + if (getArgumentCount(L_p) >= 1) { void *pointer = getPointer(L_p, 1); if (pointer != NULL) { if (((QObject*)pointer)->inherits("QIODevice")) {