|
|
|
@ -168,7 +168,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch |
|
|
|
} else if (memcmp(command, "neighbor.remove ", 16) == 0) { |
|
|
|
const char* hex = &command[16]; |
|
|
|
uint8_t pubkey[PUB_KEY_SIZE]; |
|
|
|
int hex_len = min(strlen(hex), PUB_KEY_SIZE*2); |
|
|
|
int hex_len = min((int)strlen(hex), PUB_KEY_SIZE*2); |
|
|
|
int pubkey_len = hex_len / 2; |
|
|
|
if (mesh::Utils::fromHex(pubkey, pubkey_len, hex)) { |
|
|
|
_callbacks->removeNeighbor(pubkey, pubkey_len); |
|
|
|
|