summaryrefslogtreecommitdiff
path: root/bin/cp/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cp/path.c')
-rw-r--r--bin/cp/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cp/path.c b/bin/cp/path.c
index a84892193554..170460283522 100644
--- a/bin/cp/path.c
+++ b/bin/cp/path.c
@@ -50,7 +50,7 @@ static char sccsid[] = "@(#)path.c 5.2 (Berkeley) 10/27/91";
*/
#define STRIP_TRAILING_SLASH(p) { \
- while ((p)->p_end > (p)->p_path && (p)->p_end[-1] == '/') \
+ while ((p)->p_end > ((p)->p_path + 1) && (p)->p_end[-1] == '/') \
*--(p)->p_end = 0; \
}