fix wrong fix. "kak v zadnitsu kol, russkiy rock-n-roll" (4epHeuKuu)
-/* $OpenBSD: dir.c,v 1.4 1996/09/17 19:31:18 deraadt Exp $ */
+/* $OpenBSD: dir.c,v 1.5 1996/09/18 06:59:03 mickey Exp $ */
/* $NetBSD: dir.c,v 1.1.4.1 1996/05/31 18:41:38 jtc Exp $ */
/*
#ifndef lint
-static char rcsid[] = "$OpenBSD: dir.c,v 1.4 1996/09/17 19:31:18 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.5 1996/09/18 06:59:03 mickey Exp $";
#endif /* not lint */
#include <stdio.h>
memcpy(cp, np, nl);
*--cp = '/';
} while (dir = dir->parent);
- if (dir)
+ if (dir != NULL && dir->parent != NULL)
*--cp = '?';
return cp;
}