Skip to content

Commit 7067abe

Browse files
authored
fix:remove ntstatus fmt formatting (#83)
1 parent 9856e1e commit 7067abe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/bcrypt/ntstatus.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package bcrypt
22

33
import (
4-
"fmt"
4+
"strconv"
55
"syscall"
66
"unicode/utf16"
77
)
@@ -27,7 +27,7 @@ func (s NTStatus) Error() string {
2727
b := make([]uint16, 300)
2828
n, err := formatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_FROM_HMODULE|FORMAT_MESSAGE_ARGUMENT_ARRAY, modntdll.Handle(), uint32(s), langID(LANG_ENGLISH, SUBLANG_ENGLISH_US), b, nil)
2929
if err != nil {
30-
return fmt.Sprintf("NTSTATUS 0x%08x", uint32(s))
30+
return "NTSTATUS 0x" + strconv.FormatUint(uint64(s), 16)
3131
}
3232
// trim terminating \r and \n
3333
for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- {

0 commit comments

Comments
 (0)