Opened 12 years ago

Closed 6 years ago

#3213 closed defect (invalid)

Is wxDataInputStream::Write32() bugged?

Reported by: schenkos Owned by:
Priority: normal Milestone:
Component: wxMSW Version:
Keywords: Cc: schenkos
Blocked By: Blocking:
Patch: no


I've compiled wxWidgets 2.6.3 with mingw (gcc3.4.4)
under Windows XP. I've enabled unicode support.

When I run the following code, "i" returns 4251649
instead of 1:

wxString msg = _T("");
wxStringOutputStream sos(&msg);
wxDataOutputStream os(sos);
wxUint32 i = 1;

msg.c_str()[0], msg.c_str()[1], msg.c_str()[2],
msg.c_str()[3]), _("Result"));

wxStringInputStream sis(msg);
wxDataInputStream is(sis);
i = is.Read32();
wxMessageBox(wxString::Format(_T("%u"), i),


Am I wrong or not?

Thank you in advance!

Change History (3)

comment:1 Changed 12 years ago by schenkos

sis.GetSize() returns 0 instead of 4.
Maybe it can help you.

comment:2 Changed 6 years ago by oneeyeman

Just tested the provided code on Windows 7 64-bit + MSVC 2010.

I got 1:0:0:0 and 1.

This can be fixed.

comment:3 Changed 6 years ago by vadz

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.