[3.7] bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264). (GH-12322)
(cherry picked from commit d53fe5f407ff4b529628b01a1bcbf21a6aad5c3a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index 8efda35..f946898 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -394,7 +394,7 @@
char encoding[100];
char locale[100];
- PyOS_snprintf(encoding, sizeof(encoding), "cp%d", GetACP());
+ PyOS_snprintf(encoding, sizeof(encoding), "cp%u", GetACP());
if (GetLocaleInfo(LOCALE_USER_DEFAULT,
LOCALE_SISO639LANGNAME,