From 8ab750ba97160be5199589d3e82f6a8a35a65a10 Mon Sep 17 00:00:00 2001 From: root <> Date: Tue, 13 May 2025 12:22:34 +0000 Subject: [PATCH] bugfix: removing pollfds[0] actually removed pollfds[-1] this bug created this weird behaviour: 1. client 1 connects 2. client 2 connents 3. client 1 disconnects 4. client 2 sends a line 5. client 2 is disconnected by the server --- clients.s | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients.s b/clients.s index 1af458b..e87dde4 100644 --- a/clients.s +++ b/clients.s @@ -49,11 +49,12 @@ clients__remove: add r10, -1 mov [clients_len], r10 - mov r10, 0 mov r11, r10 imul r11, client_size add r11, clients + mov r10, 0 + clients__remove__loop: cmp r10, client_size jge return