- size_t len = m_filenames[i].Len();
- memcpy(pbuf, m_filenames[i], len);
- pbuf += len;
- *pbuf++ = wxT('\0');
+ size_t len;
+#if wxUSE_UNICODE_MSLU
+ if ( sizeOfChar == sizeof(char) )
+ {
+ wxCharBuffer buf(m_filenames[i].mb_str(*wxConvFileName));
+ len = strlen(buf);
+ memcpy(pbuf, buf, len*sizeOfChar);
+ }
+ else
+#endif // wxUSE_UNICODE_MSLU
+ {
+ len = m_filenames[i].length();
+ memcpy(pbuf, m_filenames[i].wx_str(), len*sizeOfChar);
+ }
+
+ pbuf += len*sizeOfChar;
+
+ memset(pbuf, 0, sizeOfChar);
+ pbuf += sizeOfChar;