Commit 36ffff0b authored by cutealien's avatar cutealien

Fix some warnings.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5067 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 11fc4820
...@@ -383,8 +383,9 @@ void CGUIFileOpenDialog::fillListBox() ...@@ -383,8 +383,9 @@ void CGUIFileOpenDialog::fillListBox()
{ {
#ifndef _IRR_WCHAR_FILESYSTEM #ifndef _IRR_WCHAR_FILESYSTEM
const c8 *cs = (const c8 *)FileList->getFileName(i).c_str(); const c8 *cs = (const c8 *)FileList->getFileName(i).c_str();
wchar_t *ws = new wchar_t[strlen(cs) + 1]; size_t lencs = strlen(cs);
int len = mbstowcs(ws,cs,strlen(cs)); wchar_t *ws = new wchar_t[lencs + 1];
size_t len = mbstowcs(ws, cs, lencs);
ws[len] = 0; ws[len] = 0;
s = ws; s = ws;
delete [] ws; delete [] ws;
...@@ -399,8 +400,9 @@ void CGUIFileOpenDialog::fillListBox() ...@@ -399,8 +400,9 @@ void CGUIFileOpenDialog::fillListBox()
{ {
#ifndef _IRR_WCHAR_FILESYSTEM #ifndef _IRR_WCHAR_FILESYSTEM
const c8 *cs = (const c8 *)FileSystem->getWorkingDirectory().c_str(); const c8 *cs = (const c8 *)FileSystem->getWorkingDirectory().c_str();
wchar_t *ws = new wchar_t[strlen(cs) + 1]; size_t lencs = strlen(cs);
int len = mbstowcs(ws,cs,strlen(cs)); wchar_t *ws = new wchar_t[lencs + 1];
size_t len = mbstowcs(ws, cs, lencs);
ws[len] = 0; ws[len] = 0;
s = ws; s = ws;
delete [] ws; delete [] ws;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment