Fix order-of-evalutation bug-to-be

svn path=/trunk/; revision=12292
This commit is contained in:
Mike Nordell 2004-12-22 22:48:02 +00:00
parent e386edfdb9
commit 0fa4a286ba

View file

@ -99,7 +99,8 @@ adns_status adns__mkquery(adns_state ads, vbuf *vb, int *id_r,
if (!(flags & adns_qf_quoteok_query)) return adns_s_querydomaininvalid; if (!(flags & adns_qf_quoteok_query)) return adns_s_querydomaininvalid;
if (ctype_digit(p[0])) { if (ctype_digit(p[0])) {
if (ctype_digit(p[1]) && ctype_digit(p[2])) { if (ctype_digit(p[1]) && ctype_digit(p[2])) {
c= (*p++ - '0')*100 + (*p++ - '0')*10 + (*p++ - '0'); c= (p[0] - '0')*100 + (p[1] - '0')*10 + (p[0] - '0');
p += 3;
if (c >= 256) return adns_s_querydomaininvalid; if (c >= 256) return adns_s_querydomaininvalid;
} else { } else {
return adns_s_querydomaininvalid; return adns_s_querydomaininvalid;