Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Unicode APIs to handle non-ASCII usernames in path to temp file in stub. #82

Merged
merged 1 commit into from
Aug 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AngelLoader_Stub/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ extern "C" int FMSELAPI SelectFM(sFMSelectorData * data)
// Note: using ifstream instead of fopen bloats the dll up by 10k, but I can't get fopen to work. Reads the
// encoding wrong I'm guessing, I don't frickin' know. At least this works, and I can come back and shrink it
// down later when I know better what I'm doing.
std::ifstream ifs(args_file.string().c_str());
std::ifstream ifs(args_file.c_str());
// This will be false if anything's wrong, including if the file doesn't exist (which is a check we need to make)
if (!ifs)
{
Expand Down Expand Up @@ -178,7 +178,7 @@ extern "C" int FMSELAPI SelectFM(sFMSelectorData * data)

ifs.close();

std::remove(args_file.string().c_str());
fs::remove(args_file);

if (play_original_game_key_found && play_original_game)
{
Expand Down