From 09872ef885e9307dc41eb41fdc08bdb1f8ffef7a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 29 Nov 2000 22:27:15 +0000 Subject: [PATCH] * cygheap.cc (chgheap_root::operator =): Check root dir properly. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/cygheap.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ee62ec99e..312ba6db4 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +Wed Nov 29 18:25:53 2000 Kazuhiro Fujieda + + * cygheap.cc (chgheap_root::operator =): Check root dir properly. + Thu Nov 29 18:11:00 2000 Corinna Vinschen * net.cc (cygwin_inet_aton): Return nonzero if the address diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 0d720e9d5..697827b85 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -305,7 +305,7 @@ cygheap_root::operator =(const char *new_root) { root = cstrdup (new_root); rootlen = strlen (root); - if (rootlen > 1 && root[rootlen - 1] == '/') + if (rootlen >= 1 && root[rootlen - 1] == '/') root[--rootlen] = '\0'; if (!rootlen) {