Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusGuy committed Oct 5, 2024
1 parent 77cafc2 commit cb6f759
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/supertux/error_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ ErrorHandler::get_stacktrace()
if (first_time)
{
// Get the file path of the executable
std::string path;
path.reserve(MAX_PATH);
std::string path(MAX_PATH, 0);
GetModuleFileName(NULL, &path[0], MAX_PATH);

int size_needed = MultiByteToWideChar(CP_UTF8, 0, &path[0], (int) path.size(), NULL, 0);
std::wstring wpath(size_needed, 0);
MultiByteToWideChar(CP_UTF8, 0, &path[0], (int) path.size(), &wpath[0], size_needed);
Expand Down

0 comments on commit cb6f759

Please sign in to comment.