--- a/src/cmd/ksh93/bltins/cd_pwd.c 2013-10-31 16:18:43.904039613 +0100
+++ b/src/cmd/ksh93/bltins/cd_pwd.c 2013-10-31 16:18:14.980499662 +0100
@@ -81,7 +81,7 @@
dir = argv[0];
if(error_info.errors>0 || argc >2)
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
- oldpwd = (char*)shp->pwd;
+ oldpwd = path_pwd(shp,0);
opwdnod = (shp->subshell?sh_assignok(OLDPWDNOD,1):OLDPWDNOD);
pwdnod = (shp->subshell?sh_assignok(PWDNOD,1):PWDNOD);
if(argc==2)