To: vim-dev@vim.org Subject: Patch 6.1.457 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.457 Problem: An empty register in viminfo causes conversion to fail. Solution: Don't convert an empty string. (Yasuhiro Matsumoto) Files: src/ex_cmds.c, src/mbyte.c *** ../vim61.456/src/ex_cmds.c Mon Mar 31 20:13:21 2003 --- src/ex_cmds.c Fri Apr 11 10:50:00 2003 *************** *** 1840,1846 **** *d = NUL; #ifdef FEAT_MBYTE ! if (convert && virp->vir_conv.vc_type != CONV_NONE) { d = string_convert(&virp->vir_conv, retval, NULL); if (d != NULL) --- 1840,1846 ---- *d = NUL; #ifdef FEAT_MBYTE ! if (convert && virp->vir_conv.vc_type != CONV_NONE && *retval != NUL) { d = string_convert(&virp->vir_conv, retval, NULL); if (d != NULL) *** ../vim61.456/src/mbyte.c Thu Apr 10 22:58:43 2003 --- src/mbyte.c Sun Apr 13 17:19:36 2003 *************** *** 4275,4280 **** --- 4275,4282 ---- len = (int)STRLEN(ptr); else len = *lenp; + if (len == 0) + return vim_strsave((char_u *)""); switch (vcp->vc_type) { *** ../vim61.456/src/version.c Sun Apr 13 17:16:31 2003 --- src/version.c Sun Apr 13 17:23:58 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 457, /**/ -- CART DRIVER: Bring out your dead! LARGE MAN: Here's one! CART DRIVER: Ninepence. BODY: I'm not dead! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///