From: Bob Halley Date: Mon, 3 Mar 2014 16:57:35 +0000 (-0800) Subject: In LOC, deal with 0 values for size, horizontal precision, and vertical precision. X-Git-Tag: v1.12.0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f80e6392aeb863adefe283d8cc7066d9d8dc3d09;p=thirdparty%2Fdnspython.git In LOC, deal with 0 values for size, horizontal precision, and vertical precision. --- diff --git a/dns/rdtypes/ANY/LOC.py b/dns/rdtypes/ANY/LOC.py index 863c184f..6266ae66 100644 --- a/dns/rdtypes/ANY/LOC.py +++ b/dns/rdtypes/ANY/LOC.py @@ -28,6 +28,8 @@ _default_hprec = 1000000.0 _default_vprec = 1000.0 def _exponent_of(what, desc): + if what == 0: + return 0 exp = None for i in xrange(len(_pows)): if what // _pows[i] == 0L: