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
This commit is contained in:
root 2025-05-13 12:22:34 +00:00
parent 29f54ba779
commit 8ab750ba97

View file

@ -49,11 +49,12 @@ clients__remove:
add r10, -1 add r10, -1
mov [clients_len], r10 mov [clients_len], r10
mov r10, 0
mov r11, r10 mov r11, r10
imul r11, client_size imul r11, client_size
add r11, clients add r11, clients
mov r10, 0
clients__remove__loop: clients__remove__loop:
cmp r10, client_size cmp r10, client_size
jge return jge return