--- deliantra/server/socket/item.C 2006/12/14 01:21:58 1.16 +++ deliantra/server/socket/item.C 2006/12/14 02:37:37 1.18 @@ -116,7 +116,7 @@ * animation of face to the client. */ static void -add_object_to_socklist (NewSocket &ns, packet &sl, object *head) +add_object_to_socklist (client_socket &ns, packet &sl, object *head) { int flags, len, anim_speed; char item_n[MAX_BUF]; @@ -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; }