[net.unix-wizards] Error in improved pwd

rogers@dadla.UUCP (Roger Southwick) (12/13/83)

	If any of you picked up the "improved" pwd sent
over the net a few months back by Fred Blonder <fred@umcp-cs>,
I discovered a little bug in the program.  By cd'ing into
slash (cd /), then invoking pwd, yielded a blank line.

	The cure is to change the code in prname()

FROM:

prname()
{
	printf("%s\n", np);
	exit(0);
}

TO:

prname()
{
	if(*np == '\0';)
		printf("/\n");
	else
		printf("%s\n", np);
	exit(0);
}

		-Roger Southwick

		tektronix!rogers