summaryrefslogtreecommitdiff
blob: 77f0918fb4d8079258e50cc2370d4459d7b9c199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Ripped from Fedora

* Tue Mar 15 2005 Tim Waugh <twaugh@redhat.com> 3.0-30
- Fix PS1 expansion crash when PWD is unset (bg #151116).

--- bash-3.0/parse.y.pwd	2005-03-15 14:22:36.000000000 +0000
+++ bash-3.0/parse.y	2005-03-15 14:22:37.000000000 +0000
@@ -4103,7 +4103,7 @@
 #define ROOT_PATH(x)	((x)[0] == '/' && (x)[1] == 0)
 #define DOUBLE_SLASH_ROOT(x)	((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
 		/* Abbreviate \W as ~ if $PWD == $HOME */
-		if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0))
+		if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0))
 		  {
 		    if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0)
 		      {