diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-08-15 16:33:26 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-08-15 16:33:26 +0400 |
commit | 2bd94f906de5009a87effeab8dccfb0573c55f46 (patch) | |
tree | f63c6faca8514e046c41a443073c14b7b4570bdf /winsup/cygwin/mount.cc | |
parent | 975f052c600da4737cfb530ff79a5903200603e1 (diff) |
* mount.cc (mount_info::get_mounts_here): Don't subtract 2 from
Length if it's 0 anyway.
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; } |