Expect a space between Talkgroup and its number.

This commit is contained in:
Daniel Caujolle-Bert 2022-01-20 12:55:53 +01:00
parent f692301cf6
commit ccc744ec01
No known key found for this signature in database
GPG Key ID: 51AED7171EC00614
1 changed files with 1 additions and 1 deletions

View File

@ -449,7 +449,7 @@ void CP25Gateway::run()
if (res > 0) {
buffer[res] = '\0';
if (::memcmp(buffer + 0U, "TalkGroup", 9U) == 0) {
unsigned int tg = (unsigned int)::atoi((char*)(buffer + 9U));
unsigned int tg = ((strlen((char*)buffer + 0U) > 10) ? (unsigned int)::atoi((char*)(buffer + 10U)) : 9999);
if (tg != currentTG) {
if (currentAddrLen > 0U) {