fixed problem discovered by Eric Norum
This commit is contained in:
1 parent
df9b5703d5
commit
24a08c9c78
1 file changed
+2
-2
@@ -26,14 +26,14 @@ localHostName::localHostName ()
|
||||
status = gethostname ( this->cache, sizeof ( this->cache ) );
|
||||
if ( status ) {
|
||||
strncpy ( this->cache, "<unknown host>", sizeof ( this->cache ) );
|
||||
localHostName::cache [ sizeof ( this->cache ) - 1u ] = '\0';
|
||||
this->cache [ sizeof ( this->cache ) - 1u ] = '\0';
|
||||
}
|
||||
this->length = strlen ( this->cache );
|
||||
}
|
||||
else {
|
||||
this->attachedToSockLib = false;
|
||||
strncpy ( this->cache, "<unknown host>", sizeof ( this->cache ) );
|
||||
}
|
||||
this->length = strlen ( this->cache );
|
||||
}
|
||||
|
||||
localHostName::~localHostName ()
|
||||
|
||||
Reference in new issue
Block a user