1 /* $DragonFly: src/usr.bin/vi/patches/v_ex.c.patch,v 1.1 2006/02/26 17:18:06 dillon Exp $ */
2 --- v_ex.c 2003-06-17 10:46:12.000000000 +0800
3 +++ v_ex.c 2006-02-26 20:05:01.000000000 +0800
5 * Try the alternate file name, then the previous file
6 * name. Use the real name, not the user's current name.
8 - if ((name = sp->alt_name) == NULL) {
9 + if (sp->alt_name == NULL) {
10 msgq(sp, M_ERR, "180|No previous file to edit");
14 + if ((name = strdup(sp->alt_name)) == NULL) {
15 + msgq(sp, M_SYSERR, NULL);
19 /* If autowrite is set, write out the file. */
20 if (file_m1(sp, 0, FS_ALL))