Skip to content

Commit 34366b7

Browse files
ZackerySpytzzooba
authored andcommitted
bpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)
1 parent 56ed864 commit 34366b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PC/winreg.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,7 @@ winreg_SetValue_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key,
16141614
}
16151615

16161616
Py_BEGIN_ALLOW_THREADS
1617-
rc = RegSetValueW(key, sub_key, REG_SZ, value, value_length+1);
1617+
rc = RegSetValueW(key, sub_key, REG_SZ, value, (DWORD)(value_length + 1));
16181618
Py_END_ALLOW_THREADS
16191619
if (rc != ERROR_SUCCESS)
16201620
return PyErr_SetFromWindowsErrWithFunction(rc, "RegSetValue");

0 commit comments

Comments
 (0)