From 0926767a6044ec3bfaae50176d1e032eeb01429d Mon Sep 17 00:00:00 2001 From: Tom Early Date: Fri, 3 Mar 2023 09:17:03 -0700 Subject: [PATCH] GetKey() returns space-padded value --- reflector/Callsign.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reflector/Callsign.cpp b/reflector/Callsign.cpp index 940c334..765b6cb 100644 --- a/reflector/Callsign.cpp +++ b/reflector/Callsign.cpp @@ -31,8 +31,8 @@ CCallsign::CCallsign() { // blank all - memset(m_Callsign.c, ' ', CALLSIGN_LEN); - memset(m_Suffix.c, ' ', CALLSUFFIX_LEN); + m_Callsign.l = 0x2020202020202020ul; + m_Suffix.u = 0x20202020u; m_Module = ' '; m_uiDmrid = 0; m_coded = 0; @@ -150,7 +150,7 @@ bool CCallsign::IsValid(void) const iNum++; } } - valid &= (iNum < 3); + valid = valid && (iNum < 3); // all remaining char are letter, number or space for ( ; i < CALLSIGN_LEN; i++) { @@ -337,7 +337,7 @@ void CCallsign::PatchCallsign(int off, const char *patch, int len) UCallsign CCallsign::GetKey() const { UCallsign rval; - rval.l = 0; + rval.l = 0x2020202020202020ul; for (unsigned i=0; i