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")) {