]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
In LOC, deal with 0 values for size, horizontal precision, and vertical precision.
authorBob Halley <halley@dnspython.org>
Mon, 3 Mar 2014 16:57:35 +0000 (08:57 -0800)
committerBob Halley <halley@dnspython.org>
Mon, 3 Mar 2014 16:57:58 +0000 (08:57 -0800)
dns/rdtypes/ANY/LOC.py

index 863c184f08e688b1e1a30cc76af41b4675df98a8..6266ae669656bae15f4576324688e265ac80cbab 100644 (file)
@@ -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: