fix eIOBytesAvailable and eIOCanReadLine

This commit is contained in:
Syping 2020-07-27 17:11:34 +02:00
parent 1e2c36b4be
commit d6117ee54a

View file

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