Commit b35305f1 authored by 's avatar

Initializes the length of machine name properly.

This fix was suggested at (thanks!)

http://code.google.com/p/google-glog/issues/detail?id=9


git-svn-id: https://google-glog.googlecode.com/svn/trunk@62 eb4d4688-79bd-11dd-afb4-1d65580434c0
parent 2c28a493
......@@ -177,8 +177,8 @@ static void GetHostName(string* hostname) {
}
*hostname = buf.nodename;
#elif defined(OS_WINDOWS)
char buf[256];
DWORD len;
char buf[MAX_COMPUTERNAME_LENGTH + 1];
DWORD len = MAX_COMPUTERNAME_LENGTH + 1;
if (GetComputerNameA(buf, &len)) {
*hostname = buf;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment