diff options
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rw-r--r-- | python/string.cc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index f206ad0d..24d8baa5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ python-apt (0.7.4) UNRELEASED; urgency=low * aptsources/distro.py: - throw NoDistroTemplateException if not distribution template can be found + * python/string.cc: + - fix overflow in SizeToStr() -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 30 Jul 2007 22:33:59 +0200 diff --git a/python/string.cc b/python/string.cc index d0926da5..1fa5a901 100644 --- a/python/string.cc +++ b/python/string.cc @@ -55,7 +55,7 @@ PyObject *StrSizeToStr(PyObject *Self,PyObject *Args) if (PyInt_Check(Obj)) return CppPyString(SizeToStr(PyInt_AsLong(Obj))); if (PyLong_Check(Obj)) - return CppPyString(SizeToStr(PyLong_AsLong(Obj))); + return CppPyString(SizeToStr(PyLong_AsDouble(Obj))); if (PyFloat_Check(Obj)) return CppPyString(SizeToStr(PyFloat_AsDouble(Obj))); |
