mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-29 19:00:33 +02:00
Return index into range passed to :send rather than bytes written
This is what LuaSocket used to do.
This commit is contained in:
@@ -227,7 +227,7 @@ namespace LuaTCPSocket
|
||||
Reset(tcps);
|
||||
lua_pushnil(l);
|
||||
lua_pushliteral(l, "closed");
|
||||
lua_pushinteger(l, writtenTotal);
|
||||
lua_pushinteger(l, writtenTotal + begin);
|
||||
return 3;
|
||||
}
|
||||
if (res == CURLE_AGAIN)
|
||||
@@ -242,11 +242,11 @@ namespace LuaTCPSocket
|
||||
}
|
||||
lua_pushnil(l);
|
||||
lua_pushliteral(l, "timeout");
|
||||
lua_pushinteger(l, writtenTotal);
|
||||
lua_pushinteger(l, writtenTotal + begin);
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
lua_pushinteger(l, writtenTotal);
|
||||
lua_pushinteger(l, writtenTotal + begin);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user