From 24a08c9c782e1341a31f1a2ee08c5298bb424014 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Fri, 13 Jul 2001 18:08:49 +0000 Subject: [PATCH] fixed problem discovered by Eric Norum --- src/ca/localHostName.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ca/localHostName.cpp b/src/ca/localHostName.cpp index 39dd3f14d..ba81dbc84 100644 --- a/src/ca/localHostName.cpp +++ b/src/ca/localHostName.cpp @@ -26,14 +26,14 @@ localHostName::localHostName () status = gethostname ( this->cache, sizeof ( this->cache ) ); if ( status ) { strncpy ( this->cache, "", 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, "", sizeof ( this->cache ) ); } + this->length = strlen ( this->cache ); } localHostName::~localHostName ()