sysinfo;win32: don't print the username null terminator
This commit is contained in:
parent
5c14eb01e1
commit
d40d454ca4
@ -63,7 +63,8 @@ cruft::util::operator<< (std::ostream &os, sysinfo const &)
|
|||||||
|
|
||||||
if (0 == GetUserNameA (&name[0], &size))
|
if (0 == GetUserNameA (&name[0], &size))
|
||||||
win32::error::throw_code ();
|
win32::error::throw_code ();
|
||||||
name.resize (size);
|
// Remove the provided trailing null terminator
|
||||||
|
name.resize (size - 1);
|
||||||
|
|
||||||
os << ", username: " << name;
|
os << ", username: " << name;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user