Skip to content

Commit

Permalink
now it builds in release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas O'Connor committed Jan 9, 2016
1 parent 10d7844 commit 50ec7a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Tilandis/Tilandis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ int CALLBACK wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR, int nShow) {
}
}
catch (Tilandis::Exceptions::BadCommandLine exc) {
wchar_t excwhat;
const char* excwhatmbs = exc.what();
mbstowcs_s(NULL, &excwhat, strlen(excwhatmbs) + 1, excwhatmbs, (size_t) 2048);
MessageBox(NULL, &excwhat, L"Tilandis", 0);
wchar_t* excwhat = L"";
const char* excwhatmbs = "";
excwhatmbs = exc.what(); // we do it this way because the (reasonably) paranoid compiler doesn't reckon the pointer will always be initialized
mbstowcs_s(NULL, excwhat, strlen(excwhatmbs) + 1, excwhatmbs, (size_t) 2048);
MessageBox(NULL, excwhat, L"Tilandis", 0);
return 1;
}
}
Expand Down

0 comments on commit 50ec7a7

Please sign in to comment.