Skip to content

Commit

Permalink
Use Unicode APIs to handle non-ASCII usernames in path to temp file i…
Browse files Browse the repository at this point in the history
…n stub.
  • Loading branch information
FRex committed Aug 26, 2021
1 parent 0ab2407 commit 2f5a22a
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 2f5a22a

Please sign in to comment.