Page MenuHomeFreeBSD

D6188.id.diff
No OneTemporary

D6188.id.diff

Index: head/bin/sh/parser.c
===================================================================
--- head/bin/sh/parser.c
+++ head/bin/sh/parser.c
@@ -2014,8 +2014,9 @@
gethostname(&ps[i], PROMPTLEN - i);
/* Skip to end of hostname. */
trim = (*fmt == 'h') ? '.' : '\0';
- while ((ps[i+1] != '\0') && (ps[i+1] != trim))
+ while ((ps[i] != '\0') && (ps[i] != trim))
i++;
+ --i;
break;
/*
@@ -2027,7 +2028,7 @@
case 'W':
case 'w':
pwd = lookupvar("PWD");
- if (pwd == NULL)
+ if (pwd == NULL || *pwd == '\0')
pwd = "?";
if (*fmt == 'W' &&
*pwd == '/' && pwd[1] != '\0')

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 6:27 PM (2 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31045309
Default Alt Text
D6188.id.diff (648 B)

Event Timeline