#15215 closed defect (fixed)

Fix wxCountingOutputStream

Reported by: catalin Owned by:
Priority: normal Milestone:
Component: base Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: yes

Description

Do not incorrectly reuse m_lastcount to save the stream length. It is used by the base class to store the last write count.

Also mentioned here: http://trac.wxwidgets.org/ticket/12056#comment:5

Attachments (1)

15215_fix.patch download (3.4 KB) - added by catalin 11 months ago.

Download all attachments as: .zip

Change History (2)

Changed 11 months ago by catalin

comment:1 Changed 11 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [74036]) Fix return value of wxCountingOutputStream::LastWrite().

Don't reuse m_lastcount in wxCountingOutputStream to store the stream length,
this doesn't make any sense and results in LastWrite() returning completely
wrong results as it expects m_lastcount to be the number of bytes written by
the last operation.

Add m_lastPos member to store the stream length instead.

Also correct wxCountingOutputStream documentation.

Closes #15215.

Note: See TracTickets for help on using tickets.