comparison 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
comparison
equal deleted inserted replaced
6346:3f635c133c03 6347:79a667b879e7
409 * - convert the fname from 'encoding' to UCS2. 409 * - convert the fname from 'encoding' to UCS2.
410 * - invoke _wfullpath() 410 * - invoke _wfullpath()
411 * - convert the result from UCS2 to 'encoding'. 411 * - convert the result from UCS2 to 'encoding'.
412 */ 412 */
413 wname = enc_to_utf16(fname, NULL); 413 wname = enc_to_utf16(fname, NULL);
414 if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH - 1) != NULL) 414 if (wname != NULL && _wfullpath(wbuf, wname, MAX_PATH) != NULL)
415 { 415 {
416 cname = utf16_to_enc((short_u *)wbuf, NULL); 416 cname = utf16_to_enc((short_u *)wbuf, NULL);
417 if (cname != NULL) 417 if (cname != NULL)
418 { 418 {
419 vim_strncpy(buf, cname, len - 1); 419 vim_strncpy(buf, cname, len - 1);