Merge pull request #277 from f1rmb/fix_remote_commands

This commit is contained in:
Jonathan Naylor 2022-01-20 12:01:49 +00:00 committed by GitHub
commit d64d84d4cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {