Ripped from Fedora * Tue Mar 15 2005 Tim Waugh 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) {