From 578af6c6ae714fb3f88a822b5e27ebf83c6e1e84 Mon Sep 17 00:00:00 2001 From: haller Date: Mon, 5 Dec 2005 17:33:22 +0000 Subject: * Correction d'un bug dans SocketClient (read) --- i/simulotron/src/socket/socket_client.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'i/simulotron/src/socket/socket_client.cc') diff --git a/i/simulotron/src/socket/socket_client.cc b/i/simulotron/src/socket/socket_client.cc index 1224389..9099089 100644 --- a/i/simulotron/src/socket/socket_client.cc +++ b/i/simulotron/src/socket/socket_client.cc @@ -72,8 +72,9 @@ SocketClient::read (void) charReaded = ::read (socket_, buffer, BUFFER_SIZE - 1); if (charReaded < 0) throw errno_exception ("SocketClient: problème de lecture", errno); - buffer[charReaded] = 0; - str += buffer; + //buffer[charReaded] = 0; + //str += buffer; + str.append(buffer, charReaded); }while (charReaded == BUFFER_SIZE - 1); return str; } -- cgit v1.2.3