Skip to content

Commit

Permalink
Don't use wstring as buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma144 committed Aug 11, 2020
1 parent 682305c commit bfe2062
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions App/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,9 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
}

//Read seed from text box
std::wstring text;
text.reserve(100);
WCHAR text[100];
GetWindowText(hwndSeed, &text[0], 100);
int seed = _wtoi(text.c_str());
int seed = _wtoi(text);
if (seed == 0) {
//If no seed is entered, pick random seed
Random::seed(static_cast<int>(time(NULL)));
Expand Down

0 comments on commit bfe2062

Please sign in to comment.