Converting uninitialized data is not a Good Idea
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -136,6 +136,7 @@ bool wxTextFile::OnRead(wxMBConv& conv)
|
|||||||
AddLine(str, wxTextFileType_Mac);
|
AddLine(str, wxTextFileType_Mac);
|
||||||
chLast = ch;
|
chLast = ch;
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
|
conv_mbBuf[0] = ch;
|
||||||
if (conv.MB2WC(conv_wcBuf, conv_mbBuf, 2) == (size_t)-1)
|
if (conv.MB2WC(conv_wcBuf, conv_mbBuf, 2) == (size_t)-1)
|
||||||
conv_wcBuf[0] = ch;
|
conv_wcBuf[0] = ch;
|
||||||
str = conv_wcBuf[0];
|
str = conv_wcBuf[0];
|
||||||
@@ -146,6 +147,7 @@ bool wxTextFile::OnRead(wxMBConv& conv)
|
|||||||
else {
|
else {
|
||||||
// add to the current line
|
// add to the current line
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
|
conv_mbBuf[0] = ch;
|
||||||
if (conv.MB2WC(conv_wcBuf, conv_mbBuf, 2) == (size_t)-1)
|
if (conv.MB2WC(conv_wcBuf, conv_mbBuf, 2) == (size_t)-1)
|
||||||
conv_wcBuf[0] = ch;
|
conv_wcBuf[0] = ch;
|
||||||
str += conv_wcBuf[0];
|
str += conv_wcBuf[0];
|
||||||
|
Reference in New Issue
Block a user