diff --git a/main.go b/main.go index cfd57e8..69f6ebc 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,7 @@ import ( "golang.org/x/sys/windows/registry" ) -const agentTitle = "WinCrypt SSH Agent v1.1.8" +const agentTitle = "WinCrypt SSH Agent v1.1.9" var applications = []app.Application{ new(app.PubKeyView), diff --git a/utils/mmap.go b/utils/mmap.go index c8b4b34..70424ff 100644 --- a/utils/mmap.go +++ b/utils/mmap.go @@ -9,10 +9,10 @@ import ( func OpenFileMapping(dwDesiredAccess uint32, bInheritHandle uintptr, mapNamePtr uintptr) (windows.Handle, error) { ptr, _, err := pOpenFileMapping.Call(uintptr(dwDesiredAccess), bInheritHandle, mapNamePtr) - if err != nil && err.Error() == "The operation completed successfully." { - err = nil + if ptr == 0 { + return 0, err } - return windows.Handle(ptr), err + return windows.Handle(ptr), nil } type memoryMapConn struct { diff --git a/versioninfo.json b/versioninfo.json index 1af6c3a..7331889 100644 --- a/versioninfo.json +++ b/versioninfo.json @@ -3,13 +3,13 @@ "FileVersion": { "Major": 1, "Minor": 1, - "Patch": 8, + "Patch": 9, "Build": 0 }, "ProductVersion": { "Major": 1, "Minor": 1, - "Patch": 8, + "Patch": 9, "Build": 0 }, "FileFlagsMask": "3f", @@ -29,7 +29,7 @@ "OriginalFilename": "WinCryptSSHAgent.exe", "PrivateBuild": "", "ProductName": "WinCrypt SSH Agent", - "ProductVersion": "v1.1.8", + "ProductVersion": "v1.1.9", "SpecialBuild": "" }, "VarFileInfo": {