From 67c9e68559629d7571534b8a58659efb7c8d5e67 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 11 Jul 2014 19:14:14 -0400 Subject: [PATCH] fxied crash --- Garlic.cpp | 2 +- Garlic.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Garlic.cpp b/Garlic.cpp index df7bb1dc..f1768611 100644 --- a/Garlic.cpp +++ b/Garlic.cpp @@ -348,7 +348,7 @@ namespace garlic buf += 2; if (tagCount > 0) { - decryption->SetTagCount (tagCount); + decryption->AddTagCount (tagCount); for (int i = 0; i < tagCount; i++) m_SessionTags[SessionTag(buf + i*32)] = decryption; } diff --git a/Garlic.h b/Garlic.h index f2c08fb4..98df8f6f 100644 --- a/Garlic.h +++ b/Garlic.h @@ -80,7 +80,8 @@ namespace garlic public: SessionDecryption (): m_TagCount (0) {}; - void SetTagCount (int tagCount) { m_TagCount = tagCount; }; + void SetTagCount (int tagCount) { m_TagCount = tagCount; }; + void AddTagCount (int tagCount) { m_TagCount += tagCount; }; int GetTagCount () const { return m_TagCount; }; bool UseTag () { m_TagCount--; return m_TagCount > 0; };