From a4e1e13ac1dfe0f5a7c76183bb9964cb4441ccac Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Mon, 3 Mar 2014 09:02:56 -0800 Subject: 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 64b50c9..55662e0 100644 --- a/dns/rdtypes/ANY/LOC.py +++ b/dns/rdtypes/ANY/LOC.py @@ -24,6 +24,8 @@ _pows = (1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000) def _exponent_of(what, desc): + if what == 0: + return 0 exp = None for i in range(len(_pows)): if what // _pows[i] == 0: -- cgit v1.2.1