--- deliantra/server/socket/lowlevel.C 2012/11/08 02:28:21 1.90 +++ deliantra/server/socket/lowlevel.C 2012/11/08 02:50:14 1.91 @@ -353,12 +353,12 @@ if (ws_inbuf_len + 2048 > ws_inbuf_alloc) ws_inbuf = (uint8 *)realloc (ws_inbuf, ws_inbuf_alloc += 4096); - rbuf = ws_inbuf; + rbuf = ws_inbuf + ws_inbuf_len; amount = ws_inbuf_alloc - ws_inbuf_len; } else { - rbuf = inbuf; + rbuf = inbuf + inbuf_len; amount = sizeof (inbuf) - inbuf_len; } @@ -370,7 +370,7 @@ return; } - amount = read (fd, ws_inbuf + ws_inbuf_len, amount); + amount = read (fd, rbuf, amount); if (!amount) {