Ansible.Become - fix 32 bit incompatibility (#51094)

This commit is contained in:
Jordan Borean 2019-01-21 08:17:19 +10:00 committed by GitHub
parent 63f7536594
commit fa0ab82d21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -793,7 +793,7 @@ namespace Ansible.Become
using (sessionPtr)
{
for (IntPtr p = sessionPtr.DangerousGetHandle();
p != IntPtr.Add(sessionPtr.DangerousGetHandle(), (int)(IntPtr.Size * sessionCount));
p != IntPtr.Add(sessionPtr.DangerousGetHandle(), (int)(Marshal.SizeOf(typeof(NativeHelpers.LUID)) * sessionCount));
p = IntPtr.Add(p, Marshal.SizeOf(typeof(NativeHelpers.LUID))))
{
SafeLsaMemoryBuffer sessionDataPtr;