diff src/os_mswin.c @ 6347:79a667b879e7 v7.4.506

updated for version 7.4.506 Problem: MS-Windows: Cannot open a file with 259 characters. Solution: Fix off-by-one error. (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Wed, 05 Nov 2014 19:33:24 +0100
parents 15e88e3750e3
children beb67ef38f88
line wrap: on
line diff
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -411,7 +411,7 @@ mch_FullName(
 	     * - convert the result from UCS2 to 'encoding'.
 	     */
 	    wname = enc_to_utf16(fname, NULL);
-	    if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH - 1) != NULL)
+	    if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH) != NULL)
 	    {
 		cname = utf16_to_enc((short_u *)wbuf, NULL);
 		if (cname != NULL)