Fix tiny misassignment in hostsreader

`hostsreader_get` used to assign the IP address to both `name` and `ip`
fields in `struct hostsreader`, which led to proxychains effectively
ignoring the contents of `/etc/hosts`.
pull/105/head
Alexander Batischev 2016-02-01 20:58:59 +03:00
parent 672bf7661d
commit 228df4e7f3
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ int hostsreader_get(struct hostsreader *ctx, char* buf, size_t bufsize) {
l--;
}
if(!l || !*p) continue;
ctx->name = buf;
ctx->name = p;
while(*p && !isspace(*p) && l) {
p++;
l--;