diff --git a/Generals/Code/GameEngine/Source/Common/System/Debug.cpp b/Generals/Code/GameEngine/Source/Common/System/Debug.cpp index 4be8e250c2..ee67d5b708 100644 --- a/Generals/Code/GameEngine/Source/Common/System/Debug.cpp +++ b/Generals/Code/GameEngine/Source/Common/System/Debug.cpp @@ -396,7 +396,7 @@ void DebugInit(int flags) strcat(theLogFileName, DEBUG_FILE_NAME); if (rts::ClientInstance::getInstanceId() > 1u) { - size_t offset = strlen(theLogFileNamePrev); + size_t offset = strlen(theLogFileName); snprintf(theLogFileName + offset, ARRAY_SIZE(theLogFileName) - offset, "_Instance%.2u", rts::ClientInstance::getInstanceId()); } strcat(theLogFileName, ".txt"); diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp index 9692f921e3..df047cdce4 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp @@ -397,7 +397,7 @@ void DebugInit(int flags) strcat(theLogFileName, DEBUG_FILE_NAME); if (rts::ClientInstance::getInstanceId() > 1u) { - size_t offset = strlen(theLogFileNamePrev); + size_t offset = strlen(theLogFileName); snprintf(theLogFileName + offset, ARRAY_SIZE(theLogFileName) - offset, "_Instance%.2u", rts::ClientInstance::getInstanceId()); } strcat(theLogFileName, ".txt");