1
0
forked from aniani/vim

Fix that :mksession may generate "2argu" even though there is no such

argument. (Peter Odding)
This commit is contained in:
Bram Moolenaar
2010-06-26 05:25:54 +02:00
parent 182c5be111
commit 51f53dfe17

View File

@@ -10430,7 +10430,7 @@ put_view(fd, wp, add_edit, flagp, current_arg_idx)
/* Only when part of a session: restore the argument index. Some
* arguments may have been deleted, check if the index is valid. */
if (wp->w_arg_idx != current_arg_idx && wp->w_arg_idx <= WARGCOUNT(wp)
if (wp->w_arg_idx != current_arg_idx && wp->w_arg_idx < WARGCOUNT(wp)
&& flagp == &ssop_flags)
{
if (fprintf(fd, "%ldargu", (long)wp->w_arg_idx + 1) < 0