From 5c115e80b1745137cf9df5a9eddfceab2f217a11 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 28 Jan 2024 18:50:38 +0300 Subject: USERINFO validator --- include/m_chat_int.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/m_chat_int.h b/include/m_chat_int.h index 902af190f1..3cbe21e2bb 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -79,11 +79,20 @@ class CMsgDialog; struct USERINFO : public MZeroedObject, public MNonCopyable { + ~USERINFO() { + iSignature = 0; + } + wchar_t* pszUID; wchar_t* pszNick; + uint32_t iSignature = GC_FAKE_EVENT; uint16_t Status; - int iStatusEx; uint16_t ContactStatus; + int iStatusEx; + + bool isValid() const { + return iSignature == GC_FAKE_EVENT; + } }; struct MIR_APP_EXPORT GCModuleInfoBase : public MZeroedObject, public MNonCopyable -- cgit v1.2.3