Fixed bug caused by '\0' in username that broke formatting.

This commit is contained in:
Jakob Friedl
2025-09-25 20:22:56 +02:00
parent 14771a4b50
commit 166cadcb56
3 changed files with 3 additions and 7 deletions

View File

@@ -36,7 +36,7 @@ proc getUsername(): string =
# If not domain-joined, only return USERNAME
discard GetUsernameW(&buffer, &dwSize)
return $buffer[0 ..< int(dwSize)]
return $buffer[0 ..< int(dwSize) - 1]
# Current process name
proc getProcessExe(): string =