summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/peer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peer.c b/src/peer.c
index 6fe1aa2..5be79bb 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -225,7 +225,7 @@ void fastd_peer_eth_addr_add(fastd_context *ctx, fastd_peer *peer, const fastd_e
}
int i;
- for (i = ctx->n_eth_addr-1; i > min+1; i--)
+ for (i = ctx->n_eth_addr-1; i > min; i--)
ctx->eth_addr[i] = ctx->eth_addr[i-1];
ctx->eth_addr[min] = (fastd_peer_eth_addr){ *addr, peer, ctx->now };