From f80e6392aeb863adefe283d8cc7066d9d8dc3d09 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Mon, 3 Mar 2014 08:57:35 -0800 Subject: [PATCH] In LOC, deal with 0 values for size, horizontal precision, and vertical precision. --- dns/rdtypes/ANY/LOC.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- 2.47.3