Fixed get_peer from lua
This commit is contained in:
parent
5069568590
commit
ccfc81da88
1 changed files with 1 additions and 1 deletions
2
lua-tg.c
2
lua-tg.c
|
@ -343,7 +343,7 @@ static int pos;
|
|||
|
||||
static peer_t *get_peer (const char *s) {
|
||||
int index = 0;
|
||||
while (index < peer_num && Peers[index]->print_name && strcmp (Peers[index]->print_name, s)) {
|
||||
while (index < peer_num && (!Peers[index]->print_name || strcmp (Peers[index]->print_name, s))) {
|
||||
index ++;
|
||||
}
|
||||
return index == peer_num ? 0 : Peers[index];
|
||||
|
|
Loading…
Add table
Reference in a new issue