diff options
| author | Brian Curtin <brian@python.org> | 2012-12-27 14:37:06 -0600 |
|---|---|---|
| committer | Brian Curtin <brian@python.org> | 2012-12-27 14:37:06 -0600 |
| commit | 33e05e7905c00f601e4d1fea9ec0df0b3b9cb39c (patch) | |
| tree | 929086c8cd2953a05aee4d5e7826ad301dc8631e /PC | |
| parent | a0b7e9c74c36cadf2546612788795986dca64484 (diff) | |
| download | cpython-git-33e05e7905c00f601e4d1fea9ec0df0b3b9cb39c.tar.gz | |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/PC/_winreg.c b/PC/_winreg.c index 813e99383a..d60b151192 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: |
