diff options
Diffstat (limited to 'winsup/cygwin/mount.cc')
-rw-r--r-- | winsup/cygwin/mount.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc index 36363868d..03b6ff80c 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc @@ -355,7 +355,8 @@ mount_info::get_mounts_here (const char *parent_dir, int parent_dir_len, last_slash + 1); } RtlCreateUnicodeStringFromAsciiz (cygd, cygdrive + 1); - cygd->Length -= 2; // Strip trailing slash + if (cygd->Length) + cygd->Length -= 2; // Strip trailing slash return n_mounts; } |