updates
authorPekka Riikonen <priikone@silcnet.org>
Tue, 19 Mar 2002 07:43:10 +0000 (07:43 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 19 Mar 2002 07:43:10 +0000 (07:43 +0000)
lib/silccore/silcpacket.c

index 16124e29ea75bd9224ca9347b93968ddfe1844ca..dc68a6bb9db8e9a4054d081f5020f0d120378954 100644 (file)
@@ -173,8 +173,8 @@ void silc_packet_assemble(SilcPacketContext *ctx, SilcCipher cipher)
     ctx->truelen = ctx->buffer->len + SILC_PACKET_HEADER_LEN + 
       ctx->src_id_len + ctx->dst_id_len;
     if (ctx->truelen > SILC_PACKET_MAX_LEN) {
-      ctx->truelen -= (SILC_PACKET_MAX_LEN - ctx->truelen);
-      silc_buffer_push_tail(ctx->buffer, (SILC_PACKET_MAX_LEN - ctx->truelen));
+      ctx->truelen -= (ctx->truelen - SILC_PACKET_MAX_LEN);
+      silc_buffer_push_tail(ctx->buffer, (ctx->truelen - SILC_PACKET_MAX_LEN));
     }
   }