From a512c4436659019fc35df9f7eaf33060561d47a9 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 21 Dec 2017 14:08:34 +0100 Subject: [PATCH] deploy-ng: fix Windows codec error when console codepage is 0 --- pandatool/src/deploy-stub/deploy-stub.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandatool/src/deploy-stub/deploy-stub.c b/pandatool/src/deploy-stub/deploy-stub.c index 3924ba1e3f..dd61ea8bd7 100644 --- a/pandatool/src/deploy-stub/deploy-stub.c +++ b/pandatool/src/deploy-stub/deploy-stub.c @@ -69,6 +69,10 @@ static struct _inittab extensions[] = { #if defined(_WIN32) && PY_VERSION_HEX < 0x03060000 static int supports_code_page(UINT cp) { + if (cp == 0) { + cp = GetACP(); + } + /* Shortcut, because we know that these encodings are bundled by default-- * see FreezeTool.py and Python's encodings/aliases.py */ if (cp != 0 && cp != 1252 && cp != 367 && cp != 437 && cp != 850 && cp != 819) {