// Author: Julian Smart
// Modified by:
// Created: 01/02/97
-// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
if ( conv )
{
const char * const text = (const char *)data;
- const size_t len = size/sizeof(char);
+ const size_t len = size;
realSize = conv->ToWChar(NULL, 0, text, len);
if ( realSize == wxCONV_FAILED )
if ( realSize == wxCONV_FAILED )
return false;
- realData = (LPBYTE)buffer.GetWriteBuf(realSize*sizeof(char));
+ realData = (LPBYTE)buffer.GetWriteBuf(realSize);
if ( !realData )
return false;