X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fplatform%2Fwindows%2Fos-socket.h;h=86750c50b9bc4e51d5abe56d8ee8a09f253a4341;hb=5347b94bbd7455453754fd79b6aaa64aa368ce59;hp=5174cba1aaa5e5db4535a345a844c10d005d47b2;hpb=21d8397898e90f5f90be4b0c7d42922289e8ea25;p=deb_libcec.git diff --git a/src/lib/platform/windows/os-socket.h b/src/lib/platform/windows/os-socket.h index 5174cba..86750c5 100644 --- a/src/lib/platform/windows/os-socket.h +++ b/src/lib/platform/windows/os-socket.h @@ -95,6 +95,8 @@ namespace PLATFORM inline ssize_t SerialSocketRead(serial_socket_t socket, int *iError, void* data, size_t len, uint64_t iTimeoutMs /*= 0*/) { + *iError = 0; + if (len != (DWORD)len) { *iError = EINVAL;