* cygpath.cc (get_device_name): Fix path length test.

This commit is contained in:
Corinna Vinschen 2010-12-06 13:40:24 +00:00
parent 9de485e8e0
commit ac5d7dcd18
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2010-12-06 Corinna Vinschen <corinna@vinschen.de>
* cygpath.cc (get_device_name): Fix path length test.
2010-10-30 Dmitry Potapov <dpotapov@gmail.com>
* regtool.c (cmd_set): Write correct number of bytes for REG_MULTI_SZ

View File

@ -279,7 +279,7 @@ get_device_name (char *path)
DOS pathname without the \\.\ prefix. Unless it's
longer than MAX_PATH - 1 in which case it needs
the \\?\ prefix. */
if (len = strlen (ret + 4) >= MAX_PATH)
if ((len = strlen (ret + 4)) >= MAX_PATH)
ret[2] = '?';
else
memmove (ret, ret + 4, strlen (ret + 4) + 1);