Commit 9bad0df6 authored by Chen Bill's avatar Chen Bill

use BufferIO::CopyWideString

parent ebf125f0
...@@ -540,7 +540,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -540,7 +540,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
const wchar_t* newcatename = mainGame->cbDMCategory->getText(); const wchar_t* newcatename = mainGame->cbDMCategory->getText();
const wchar_t* olddeckname = mainGame->lstDecks->getListItem(decksel); const wchar_t* olddeckname = mainGame->lstDecks->getListItem(decksel);
wchar_t deckname[256]; wchar_t deckname[256];
BufferIO::CopyWStr(olddeckname, deckname, 256); BufferIO::CopyWideString(olddeckname, deckname);
wchar_t oldfilepath[256]; wchar_t oldfilepath[256];
deckManager.GetDeckFile(oldfilepath, mainGame->cbDBCategory, mainGame->cbDBDecks); deckManager.GetDeckFile(oldfilepath, mainGame->cbDBCategory, mainGame->cbDBDecks);
wchar_t newfilepath[256]; wchar_t newfilepath[256];
...@@ -580,7 +580,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -580,7 +580,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
const wchar_t* newcatename = mainGame->cbDMCategory->getText(); const wchar_t* newcatename = mainGame->cbDMCategory->getText();
const wchar_t* olddeckname = mainGame->lstDecks->getListItem(decksel); const wchar_t* olddeckname = mainGame->lstDecks->getListItem(decksel);
wchar_t deckname[256]; wchar_t deckname[256];
BufferIO::CopyWStr(olddeckname, deckname, 256); BufferIO::CopyWideString(olddeckname, deckname);
wchar_t newfilepath[256]; wchar_t newfilepath[256];
if(oldcatesel != 2 && newcatesel == 0) { if(oldcatesel != 2 && newcatesel == 0) {
myswprintf(newfilepath, L"./deck/%ls.ydk", deckname); myswprintf(newfilepath, L"./deck/%ls.ydk", deckname);
......
...@@ -499,7 +499,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -499,7 +499,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame->HideElement(mainGame->wReplaySave); mainGame->HideElement(mainGame->wReplaySave);
if(prev_operation == BUTTON_RENAME_REPLAY) { if(prev_operation == BUTTON_RENAME_REPLAY) {
wchar_t newname[256]; wchar_t newname[256];
BufferIO::CopyWStr(mainGame->ebRSName->getText(), newname, 256); BufferIO::CopyWideString(mainGame->ebRSName->getText(), newname);
if(mywcsncasecmp(newname + wcslen(newname) - 4, L".yrp", 4)) { if(mywcsncasecmp(newname + wcslen(newname) - 4, L".yrp", 4)) {
myswprintf(newname, L"%ls.yrp", mainGame->ebRSName->getText()); myswprintf(newname, L"%ls.yrp", mainGame->ebRSName->getText());
} }
......
...@@ -71,7 +71,7 @@ public: ...@@ -71,7 +71,7 @@ public:
static bool DeleteDir(const wchar_t* wdir) { static bool DeleteDir(const wchar_t* wdir) {
wchar_t pdir[256]; wchar_t pdir[256];
BufferIO::CopyWStr(wdir, pdir, 256); BufferIO::CopyWideString(wdir, pdir);
pdir[wcslen(wdir) + 1] = 0; pdir[wcslen(wdir) + 1] = 0;
SHFILEOPSTRUCTW lpFileOp; SHFILEOPSTRUCTW lpFileOp;
lpFileOp.hwnd = NULL; lpFileOp.hwnd = NULL;
......
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