--- src/tX_legacy_global.c-dist	2003-06-26 22:43:04.000000000 +0200
+++ src/tX_legacy_global.c	2003-08-25 16:12:41.000000000 +0200
@@ -30,16 +30,14 @@
 
 void get_rc_name_old(char *buffer)
 {
+	const char *s;
 	strcpy(buffer,"");
 
-	if (getenv("HOME"))
-	{
-		strcpy(buffer, getenv("HOME"));
-		if (buffer[strlen(buffer)-1]!='/')
-		strcat(buffer, "/");
-	}
-	
-	strcat(buffer, ".terminatorX3rc.bin");
+	s = getenv("HOME");
+	if (s && *s)
+		snprintf(buffer, PATH_MAX, "%s/.terminatorX3rc.bin", s);
+	else
+		strcpy(buffer, ".terminatorX3rc.bin");
 }
 
 void load_globals_old() {	
