Minor injector and launcher payload refactoring

This commit is contained in:
mkrsym1
2023-06-10 18:28:19 +03:00
parent 3994188b08
commit 54a127b848
2 changed files with 4 additions and 12 deletions

View File

@ -34,8 +34,7 @@ int main(int argc, char **argv) {
char injectorPath[MAX_PATH];
GetModuleFileNameA(GetModuleHandleA(NULL), injectorPath, sizeof(injectorPath));
char *lastSep = strrchr(injectorPath, '\\');
*lastSep = '\0';
*(strrchr(injectorPath, '\\')) = '\0';
SetCurrentDirectoryA(injectorPath);
@ -49,7 +48,7 @@ int main(int argc, char **argv) {
char launcherPayloadPath[MAX_PATH];
GetFullPathNameA(LAUNCHER_INJECT_DLL, sizeof(launcherPayloadPath), launcherPayloadPath, NULL);
printf("Starting \"%s\" via \"%s\"\n", gameExePath, launcherPath);
printf("Starting '%s' via '%s'\n", gameExePath, launcherPath);
// Set envvars
SetEnvironmentVariableA(ENV_EXE_PATH, gameExePath);