fix socket write
All checks were successful
Linux arm64 / Build (push) Successful in 16s

This commit is contained in:
2025-03-02 21:13:07 +01:00
parent b687ac65f1
commit 025a9c1469

View File

@@ -123,7 +123,7 @@ void TcpSocket::Write(const sp::DataBuffer& a_Data) {
std::size_t sent = 0;
while (sent < a_Data.GetSize()) {
int cur = send(m_Handle, reinterpret_cast<const char*>(a_Data.GetSize() + sent), static_cast<int>(a_Data.GetSize() - sent), 0);
int cur = send(m_Handle, reinterpret_cast<const char*>(a_Data.data() + sent), static_cast<int>(a_Data.GetSize() - sent), 0);
if (cur <= 0) {
Disconnect();