summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelie <elie>2011-06-05 21:11:39 +0000
committerelie <elie>2011-06-05 21:11:39 +0000
commitd948d8704cd18cac866ee9cde836686e26d127f8 (patch)
treec45e80b3717d41f0a3710374dbe3caa779103ee5
parent78ccf81f78310cb29be2723c378fb37b2f4a1c79 (diff)
downloadpyasn1-git-d948d8704cd18cac866ee9cde836686e26d127f8.tar.gz
fix to base10 normalization function that loops on univ.Real(0)
-rw-r--r--CHANGES.txt5
-rw-r--r--pyasn1/type/univ.py2
-rw-r--r--setup.py2
3 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 352b158..ddd2c1e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,8 @@
+Revision 0.0.13
+---------------
+
+- Fix to base10 normalization function that loops on univ.Real(0)
+
Revision 0.0.13b
----------------
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index 8047828..08f9e39 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -416,7 +416,7 @@ class Real(base.AbstractSimpleAsn1Item):
def __normalizeBase10(self, value):
m, b, e = value
- while m % 10 == 0:
+ while m and m % 10 == 0:
m = m / 10
e = e + 1
return m, b, e
diff --git a/setup.py b/setup.py
index 78335ed..6ae89b8 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ except ImportError:
params.update( {
'name': 'pyasn1',
- 'version': '0.0.13b',
+ 'version': '0.0.13',
'description': 'ASN.1 types and codecs',
'author': 'Ilya Etingof',
'author_email': 'ilya@glas.net',