diff options
author | Thomas Wouters <thomas@python.org> | 2006-04-20 22:36:57 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-04-20 22:36:57 (GMT) |
commit | 4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a (patch) | |
tree | 8cfa40a2802e5a5f14c021d088afb072a4660e52 /Lib | |
parent | a48a3b42dd78c0201010ed737fdc45244a526648 (diff) | |
download | cpython-4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a.zip cpython-4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a.tar.gz cpython-4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a.tar.bz2 |
Fix typical truedivision problem (using the result of division as an index.)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/xdrlib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index 47cc22b..b349eb9 100644 --- a/Lib/xdrlib.py +++ b/Lib/xdrlib.py @@ -80,7 +80,7 @@ class Packer: if n < 0: raise ValueError, 'fstring size must be nonnegative' data = s[:n] - n = ((n+3)/4)*4 + n = ((n+3)//4)*4 data = data + (n - len(data)) * '\0' self.__buf.write(data) @@ -192,7 +192,7 @@ class Unpacker: if n < 0: raise ValueError, 'fstring size must be nonnegative' i = self.__pos - j = i + (n+3)/4*4 + j = i + (n+3)//4*4 if j > len(self.__buf): raise EOFError self.__pos = j |