summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
Diffstat (limited to 'PC')
-rw-r--r--PC/winreg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index 454ea53..523ad17 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -785,7 +785,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
memcpy(*retDataBuf, &zero, sizeof(DWORD));
}
else {
- DWORD d = PyLong_AsLong(value);
+ DWORD d = PyLong_AsUnsignedLong(value);
memcpy(*retDataBuf, &d, sizeof(DWORD));
}
break;