Skip to content

Commit 36aecc0

Browse files
bpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)
(cherry picked from commit 34366b7) Co-authored-by: Zackery Spytz <[email protected]>
1 parent 7038dee commit 36aecc0

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
@@ -1609,7 +1609,7 @@ winreg_SetValue_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key,
16091609
}
16101610

16111611
Py_BEGIN_ALLOW_THREADS
1612-
rc = RegSetValueW(key, sub_key, REG_SZ, value, value_length+1);
1612+
rc = RegSetValueW(key, sub_key, REG_SZ, value, (DWORD)(value_length + 1));
16131613
Py_END_ALLOW_THREADS
16141614
if (rc != ERROR_SUCCESS)
16151615
return PyErr_SetFromWindowsErrWithFunction(rc, "RegSetValue");

0 commit comments

Comments
 (0)