From 44ff671fe5584a9fb073c4b767825c58504aa083 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 29 Mar 2001 12:06:23 +0000 Subject: Don't assume we can change the string for the HOST parameter when used in a prompt --- Src/prompt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Src/prompt.c') diff --git a/Src/prompt.c b/Src/prompt.c index b90bfff2a..84f88b2d3 100644 --- a/Src/prompt.c +++ b/Src/prompt.c @@ -392,10 +392,7 @@ putpromptchar(int doprint, int endchar) for (ss = hostnam; *ss; ss++) if (*ss == '.' && !--arg) break; - t0 = *ss; - *ss = '\0'; - stradd(hostnam); - *ss = t0; + stradd(*ss ? dupstrpfx(hostnam, ss - hostnam) : hostnam); } unqueue_signals(); break; -- cgit 1.4.1