diff --git a/src/ccallsign.cpp b/src/ccallsign.cpp index adaa78d..77f5a58 100644 --- a/src/ccallsign.cpp +++ b/src/ccallsign.cpp @@ -338,7 +338,7 @@ CCallsign::operator const char *() const // module if ( HasModule() ) { - m_sz[sizeof(m_Callsign) - 1] = m_Module; + m_sz[sizeof(m_Callsign)] = m_Module; } // suffix if ( HasSuffix() ) diff --git a/src/cdmrmmdvmprotocol.cpp b/src/cdmrmmdvmprotocol.cpp index 008ff7a..1a12605 100644 --- a/src/cdmrmmdvmprotocol.cpp +++ b/src/cdmrmmdvmprotocol.cpp @@ -504,7 +504,7 @@ bool CDmrmmdvmProtocol::IsValidConnectPacket(const CBuffer &Buffer, CCallsign *c valid = callsign->IsValid(); if ( !valid) { - std::cout << "Invalid callsign in DMRmmdvm RPTL packet from IP: " << Ip << " CS:" << callsign << " DMRID:" << callsign->GetDmrid() << std::endl; + std::cout << "Invalid callsign in DMRmmdvm RPTL packet from IP: " << Ip << " CS:" << *callsign << " DMRID:" << callsign->GetDmrid() << std::endl; } } return valid; @@ -523,7 +523,7 @@ bool CDmrmmdvmProtocol::IsValidAuthenticationPacket(const CBuffer &Buffer, CCall valid = callsign->IsValid(); if ( !valid) { - std::cout << "Invalid callsign in DMRmmdvm RPTK packet from IP: " << Ip << " CS:" << callsign << " DMRID:" << callsign->GetDmrid() << std::endl; + std::cout << "Invalid callsign in DMRmmdvm RPTK packet from IP: " << Ip << " CS:" << *callsign << " DMRID:" << callsign->GetDmrid() << std::endl; } } @@ -558,7 +558,7 @@ bool CDmrmmdvmProtocol::IsValidConfigPacket(const CBuffer &Buffer, CCallsign *ca valid = callsign->IsValid(); if ( !valid) { - std::cout << "Invalid callsign in DMRmmdvm RPTC packet from IP: " << Ip << " CS:" << callsign << " DMRID:" << callsign->GetDmrid() << std::endl; + std::cout << "Invalid callsign in DMRmmdvm RPTC packet from IP: " << Ip << " CS:" << *callsign << " DMRID:" << callsign->GetDmrid() << std::endl; } } diff --git a/src/cdmrplusprotocol.cpp b/src/cdmrplusprotocol.cpp index 88ec6b9..54e7c9c 100644 --- a/src/cdmrplusprotocol.cpp +++ b/src/cdmrplusprotocol.cpp @@ -386,7 +386,7 @@ bool CDmrplusProtocol::IsValidConnectPacket(const CBuffer &Buffer, CCallsign *ca valid = (callsign->IsValid() && (std::isupper(*reflectormodule) || (*reflectormodule == ' ')) ); if ( !valid) { - std::cout << "Invalid callsign in DMR+ connect packet from IP: " << Ip << " CS:" << callsign << " DMRID:" << callsign->GetDmrid() << " ReflectorModule:" << *reflectormodule << std::endl; + std::cout << "Invalid callsign in DMR+ connect packet from IP: " << Ip << " CS:" << *callsign << " DMRID:" << callsign->GetDmrid() << " ReflectorModule:" << *reflectormodule << std::endl; } } return valid;