1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[lookup] Negative values were returned by --lookup

This commit is contained in:
Witold Filipczyk 2022-05-08 20:28:36 +02:00
parent c5d321c1b5
commit ca1241585f

View File

@ -205,7 +205,7 @@ lookup_cmd(struct option *o, char ***argv, int *argc)
printf("%s\n", p);
#else
struct sockaddr_in addr = *((struct sockaddr_in *) &(addrs)[i]);
char *p = (char *) &addr.sin_addr.s_addr;
unsigned char *p = (char *) &addr.sin_addr.s_addr;
printf("%d.%d.%d.%d\n", (int) p[0], (int) p[1],
(int) p[2], (int) p[3]);