diff --git a/Changelog b/Changelog index bba625e..6de99b0 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,6 @@ [Changes 1.2c01] -* Fix /nslookup command. (caf) +* Fix /nslookup command (including fixing compilation on cygwin). (caf) * Improve /detach error handling and remove bogus F_SETOWN use, reported by madsage. (caf) diff --git a/source/misc.c b/source/misc.c index cd25b20..6ff15f1 100644 --- a/source/misc.c +++ b/source/misc.c @@ -2655,14 +2655,10 @@ static int ar_procanswer(struct reslist *rptr, HEADER *hptr, char *buf, char *eo * the pointer to the right spot. Some of thse are actually * useful so its not a good idea to skip past in one big jump. */ - type = (int)_getshort(cp); - cp += sizeof(short); - class = (int)_getshort(cp); - cp += sizeof(short); - ttl = (unsigned int)_getlong(cp); - cp += INT32SZ; - dlen = (int)_getshort(cp); - cp += sizeof(short); + NS_GET16(type, cp); + NS_GET16(class, cp); + NS_GET32(ttl, cp); + NS_GET16(dlen, cp); rptr->re_type = type; switch(type)