Skip to content

Commit

Permalink
Update WakaTimeForUE.cpp fixed line 173
Browse files Browse the repository at this point in the history
"[C2440] '=': cannot convert from 'const char [3]' to 'char *'
It should now work and compile without problems
  • Loading branch information
Rxxbertx committed Dec 24, 2023
1 parent 93ea0a6 commit 94148de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/WakaTimeForUE/Private/WakaTimeForUE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,11 @@ void FWakaCommands::RegisterCommands()
void FWakaTimeForUEModule::AssignGlobalVariables()
{
// use _dupenv_s instead of getenv, as it is safer
GUserProfile = "c:";
GUserProfile = _strdup("c:");
size_t LenDrive = NULL;
_dupenv_s(&GUserProfile, &LenDrive, "USERPROFILE");

free(GUserProfile);

/*string profile = GUserProfile;
profile.insert(0, 1, '"');
profile.append("\"");
Expand Down

0 comments on commit 94148de

Please sign in to comment.