diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2007-08-28 14:54:36 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2007-08-28 14:54:36 +0200 |
| commit | 9d88586c37e9a5702949f90fc589ef941d57f661 (patch) | |
| tree | eea061462df3613698776bd933659bf987dbbb37 | |
| parent | ddf91759e3fabee1e0d61372247c4256758c387c (diff) | |
| download | python-apt-9d88586c37e9a5702949f90fc589ef941d57f661.tar.gz | |
* python/string.cc:
- fix overflow in SizeToStr()
| -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))); |
