Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Source/UnrealEnginePython/Private/PyCommandlet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int32 UPyCommandlet::Main(const FString& CommandLine)
#if PY_MAJOR_VERSION >= 3
argv[i] = (wchar_t*)malloc(PyArgv[i].Len() + 1);
#if PLATFORM_MAC || PLATFORM_LINUX
wcsncpy(argv[i], *PyArgv[i].ReplaceEscapedCharWithChar(), PyArgv[i].Len() + 1);
wcsncpy(argv[i], (const wchar_t *) TCHAR_TO_WCHAR(*PyArgv[i].ReplaceEscapedCharWithChar()), PyArgv[i].Len() + 1);
#elif PLATFORM_ANDROID
wcsncpy(argv[i], (const wchar_t *)*PyArgv[i].ReplaceEscapedCharWithChar(), PyArgv[i].Len() + 1);
#else
Expand Down
2 changes: 1 addition & 1 deletion Source/UnrealEnginePython/Private/UnrealEnginePython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void FUnrealEnginePythonModule::UESetupPythonInterpreter(bool verbose)
for (int32 i = 0; i < Args.Num(); i++)
{
#if PY_MAJOR_VERSION >= 3
argv[i] = (wchar_t *)(*Args[i]);
argv[i] = (wchar_t *)(TCHAR_TO_WCHAR(*Args[i]));
#else
argv[i] = TCHAR_TO_UTF8(*Args[i]);
#endif
Expand Down