fix: struct were not passed correctly as the argument of *_response

This commit is contained in:
0x35c
2025-05-26 16:01:49 +02:00
parent 675248cbff
commit ad367d6792
2 changed files with 12 additions and 8 deletions

View File

@ -19,11 +19,11 @@ void *routine(void *p_data)
port <= thread_data->port_end; port++) {
scan_data.port = port;
scan_data.response =
&thread_data->responses[thread_data->port_start - port];
&thread_data->responses[port - thread_data->port_start];
if (scan(&scan_data))
return NULL;
printf("state of port %d: %d\n", port,
scan_data.response->state);
printf("%d: %s\n", port,
scan_data.response->state == 1 ? "OPEN" : "CLOSED");
}
return p_data;