base: Fix offset initialization of Windows hLock implementation
authorBen Gamari <bgamari.foss@gmail.com>
Fri, 21 Apr 2017 16:10:33 +0000 (12:10 -0400)
committerBen Gamari <ben@smart-cactus.org>
Fri, 21 Apr 2017 16:10:42 +0000 (12:10 -0400)
commite134af010bdd0d2a94fbfd68e0605dc55e1be3a8
tree61632b07212f79e4622b149c64d53ba34ccbdada
parenta1ffd70835fba3aeb5be5c5d526e068cafe277be
base: Fix offset initialization of Windows hLock implementation

The previous implementation swapped the buffer size with the byte to be
set, essentially resulting in an uninitialized buffer.

Test Plan: Validate on Windows

Reviewers: austin, hvr

Subscribers: rwbarton, thomie

GHC Trac Issues: #13599

Differential Revision: https://phabricator.haskell.org/D3478
libraries/base/GHC/IO/Handle/Lock.hsc