Skip to content

Commit

Permalink
bpo-36672: Fix a compiler warning in winreg.SetValue() (GH-12882)
Browse files Browse the repository at this point in the history
(cherry picked from commit 34366b7)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
  • Loading branch information
miss-islington and ZackerySpytz authored Apr 22, 2019
1 parent 7038dee commit 36aecc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PC/winreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ winreg_SetValue_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key,
}

Py_BEGIN_ALLOW_THREADS
rc = RegSetValueW(key, sub_key, REG_SZ, value, value_length+1);
rc = RegSetValueW(key, sub_key, REG_SZ, value, (DWORD)(value_length + 1));
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegSetValue");
Expand Down

0 comments on commit 36aecc0

Please sign in to comment.