summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2012-12-27 20:37:06 (GMT)
committerBrian Curtin <brian@python.org>2012-12-27 20:37:06 (GMT)
commit33e05e7905c00f601e4d1fea9ec0df0b3b9cb39c (patch)
tree929086c8cd2953a05aee4d5e7826ad301dc8631e /PC
parenta0b7e9c74c36cadf2546612788795986dca64484 (diff)
downloadcpython-33e05e7905c00f601e4d1fea9ec0df0b3b9cb39c.zip
cpython-33e05e7905c00f601e4d1fea9ec0df0b3b9cb39c.tar.gz
cpython-33e05e7905c00f601e4d1fea9ec0df0b3b9cb39c.tar.bz2
Fix #16759. Convert DWORD registry values using unsigned long.
When converting REG_DWORD registry values into Python, the conversion needs to be made from an *unsigned* long (k instead of i) to match the DWORD type.
Diffstat (limited to 'PC')
-rw-r--r--PC/_winreg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/PC/_winreg.c b/PC/_winreg.c
index 813e993..d60b151 100644
--- a/PC/_winreg.c
+++ b/PC/_winreg.c
@@ -918,9 +918,9 @@ Reg2Py(char *retDataBuf, DWORD retDataSize, DWORD typ)
switch (typ) {
case REG_DWORD:
if (retDataSize == 0)
- obData = Py_BuildValue("i", 0);
+ obData = Py_BuildValue("k", 0);
else
- obData = Py_BuildValue("i",
+ obData = Py_BuildValue("k",
*(int *)retDataBuf);
break;
case REG_SZ: