Skip to content

Commit 078908e

Browse files
authored
Merge pull request 20tab#625 from dontnod/fix-stdout-mangling
Use C++ conformant “_fileno” instead of “fileno”.
2 parents 43970bb + ab0ac86 commit 078908e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/UnrealEnginePython/Private/UnrealEnginePython.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,9 @@ void FUnrealEnginePythonModule::StartupModule()
460460
// Restore stdio state after Py_Initialize set it to O_BINARY, otherwise
461461
// everything that the engine will output is going to be encoded in UTF-16.
462462
// The behaviour is described here: https://bugs.python.org/issue16587
463-
_setmode(fileno(stdin), O_TEXT);
464-
_setmode(fileno(stdout), O_TEXT);
465-
_setmode(fileno(stderr), O_TEXT);
463+
_setmode(_fileno(stdin), O_TEXT);
464+
_setmode(_fileno(stdout), O_TEXT);
465+
_setmode(_fileno(stderr), O_TEXT);
466466

467467
// Also restore the user-requested UTF-8 flag if relevant (behaviour copied
468468
// from LaunchEngineLoop.cpp).

0 commit comments

Comments
 (0)