Skip to content

Commit

Permalink
fix:remove ntstatus fmt formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mertakman committed Jan 8, 2025
1 parent 9856e1e commit 2ae7cd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/bcrypt/ntstatus.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package bcrypt

import (
"fmt"
"strconv"
"syscall"
"unicode/utf16"
)
Expand All @@ -27,7 +27,7 @@ func (s NTStatus) Error() string {
b := make([]uint16, 300)
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)
if err != nil {
return fmt.Sprintf("NTSTATUS 0x%08x", uint32(s))
return "NTSTATUS 0x" + strconv.FormatUint(uint64(s), 16)
}
// trim terminating \r and \n
for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- {
Expand Down

0 comments on commit 2ae7cd8

Please sign in to comment.