--- deliantra/server/socket/item.C 2006/12/14 01:21:58 1.16 +++ deliantra/server/socket/item.C 2006/12/14 01:59:10 1.17 @@ -294,7 +294,7 @@ add_object_to_socklist (pl->contr->socket, sl, head); got_one++; - if (sl.len >= (MAXSOCKBUF - MAXITEMLEN)) + if (sl.length () >= (MAXSOCKBUF - MAXITEMLEN)) { Send_With_Handling (&pl->contr->socket, &sl); @@ -349,11 +349,12 @@ * items (especially with some of the bags out there) to * overflow the buffer. IF so, send multiple item commands. */ - if (sl.len >= (MAXSOCKBUF - MAXITEMLEN)) + if (sl.length () >= (MAXSOCKBUF - MAXITEMLEN)) { Send_With_Handling (&pl->contr->socket, &sl); - sprintf ((char *) sl.buf, "item%d ", pl->contr->socket.itemcmd); - sl.len = strlen ((char *) sl.buf); + + sl.reset (); + sl.printf ("item%d ", pl->contr->socket.itemcmd); sl << uint32 (op->count); got_one = 0; }