Changeset 56201

Show
Ignore:
Timestamp:
10/09/08 10:00:32 (6 weeks ago)
Author:
FM
Message:

fixed a bug caused by passing a wxChar[] buffer to a function taking a wxString; the buffer was automatically converted but since it was not NULL-terminated, a crash resulted

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wxWidgets/trunk/src/richtext/richtextbuffer.cpp

    r55653 r56201  
    75897589        delete[] m_data; 
    75907590 
    7591     wxChar str[2]; 
     7591    // create a null terminated temporary string: 
     7592    char str[3]; 
     7593    str[2] = '\0'; 
     7594 
    75927595    m_data = new unsigned char[dataSize]; 
    75937596    int i;