diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-01-22 23:38:09 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-01-22 23:38:09 +0000 |
commit | 535bbba3e10f07de12e7f1626128b7d417ed450a (patch) | |
tree | b2837a321285ac1dc69e824041d4004d7f13ae66 /src/util/Network.c | |
parent | 329e4adee794a4fab4a00d8d05a8f6ceaa8e3876 (diff) |
The terminating NUL character was set one bytes too far into the hoststring.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2007 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/Network.c')
-rw-r--r-- | src/util/Network.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/util/Network.c b/src/util/Network.c index ee362f02..ecb27722 100644 --- a/src/util/Network.c +++ b/src/util/Network.c @@ -22,8 +22,6 @@ #include <winsock2.h> #endif /* HAVE_WINSOCK2_H */ -#include "util_Network.h" - static char *rcsid = "$Header$"; CCTK_FILEVERSION(util_Network_c) @@ -90,7 +88,7 @@ void Util_GetHostName (char *name, int length) if (thishostent) { strncpy (name, thishostent->h_name, length); - name[length] = 0; + name[length - 1] = 0; } #endif } |