diff options
-rw-r--r-- | FICS/playerdb.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c index b350e39..3882eda 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -1441,15 +1441,20 @@ PUBLIC int player_new_pendfrom(int p) return parray[p].num_from - 1; } -PUBLIC int player_remove_pendfrom(int p, int p1, int type) +PUBLIC int +player_remove_pendfrom(int p, int p1, int type) { - int w; - if ((w = player_find_pendfrom(p, p1, type)) < 0) - return -1; - for (; w < parray[p].num_from - 1; w++) - parray[p].p_from_list[w] = parray[p].p_from_list[w + 1]; - parray[p].num_from = parray[p].num_from - 1; - return 0; + int w; + + if ((w = player_find_pendfrom(p, p1, type)) < 0) + return -1; + + for (; w < (parray[p].num_from - 1); w++) + parray[p].p_from_list[w] = parray[p].p_from_list[w + 1]; + + parray[p].num_from = (parray[p].num_from - 1); + + return 0; } PUBLIC int |