summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--simplejson/decoder.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/simplejson/decoder.py b/simplejson/decoder.py
index abdc585..6df951b 100644
--- a/simplejson/decoder.py
+++ b/simplejson/decoder.py
@@ -16,6 +16,8 @@ FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
def _floatconstants():
_BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
+ # The struct module in Python 2.4 would get frexp() out of range here
+ # when an endian is specified in the format string. Fixed in Python 2.5+
if sys.byteorder != 'big':
_BYTES = _BYTES[:8][::-1] + _BYTES[8:][::-1]
nan, inf = struct.unpack('dd', _BYTES)