From da56397b392f7266f49803a8a4137415d4a2bc79 Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 4 Jun 2015 11:31:22 -0400 Subject: [PATCH] fixed bug with zero-size clove --- Garlic.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Garlic.cpp b/Garlic.cpp index 34ed84b3..bbfaed91 100644 --- a/Garlic.cpp +++ b/Garlic.cpp @@ -225,9 +225,10 @@ namespace garlic if (newTags || m_LeaseSetUpdateStatus == eLeaseSetUpdated) // new tags created or leaseset updated { // clove is DeliveryStatus - size += CreateDeliveryStatusClove (payload + size, msgID); - if (size > 0) // successive? + auto cloveSize = CreateDeliveryStatusClove (payload + size, msgID); + if (cloveSize > 0) // successive? { + size += cloveSize; (*numCloves)++; if (newTags) // new tags created m_UnconfirmedTagsMsgs[msgID] = newTags;