haskell / win32

Haskell support for the Win32 API
http://hackage.haskell.org/package/Win32
Other
98 stars 62 forks source link

Change maxLength to 16 in function getComputerName #189

Closed gussen closed 2 years ago

gussen commented 2 years ago

Change maxLength to 16 in function getComputerName

Current Behavior

My computername is DESKTOP-28LPP05 (15 characters) and when I call getComputerName I get error: GetComputerName: invalid argument (The file name is too long.)

If I set maxLength = 16 inside the function, getComputerName, it works as expected, I get the computername back.

Steps to Reproduce (for bugs)

Set a computername that is 15 characters long and call getComputerName.

Your Environment

Mistuke commented 2 years ago

Fixed, thanks for the report!