]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[ Bug #116636 ] Bug in StringIO.write()
authorGuido van Rossum <guido@python.org>
Thu, 12 Oct 2000 16:45:37 +0000 (16:45 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 12 Oct 2000 16:45:37 +0000 (16:45 +0000)
commitb636dc67ed3c351d9631a7900ea05c3394a99518
treeabc7c1192f0a6fd47535a4d92df8fba3daee6216
parent2e2a70abe48d84846fde5e9a64450f8b0c9934b2
[ Bug #116636 ] Bug in StringIO.write()
http://sourceforge.net/bugs/?func=detailbug&bug_id=116636&group_id=5470
bobalex@rsv.ricoh.com

Bug report: If the file position is less than the end of the "file",
and a write is performed extending past then end of the file, the data
string is corrupted.

Solution: in write(), when writing past the end, properly set self.len
when newpos is > self.len.
Lib/StringIO.py