To: vim-dev@vim.org Subject: Patch 5.6a.23 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.6a.023 Problem: Using expand("%:gs??/?") causes a crash. (Ron Aaron) Solution: Check for running into the end of the string in do_string_sub(). Files: src/eval.c *** ../vim-5.6a.22/src/eval.c Wed Dec 29 12:11:00 1999 --- src/eval.c Wed Jan 12 21:14:54 2000 *************** *** 5784,5789 **** --- 5784,5791 ---- /* avoid getting stuck on a match with an empty string */ if (tail == prog->endp[0]) { + if (*tail == NUL) + break; *((char_u *)ga.ga_data + ga.ga_len) = *tail++; ++ga.ga_len; --ga.ga_room; *** ../vim-5.6a.22/src/version.c Wed Jan 12 21:20:04 2000 --- src/version.c Wed Jan 12 21:19:48 2000 *************** *** 420,421 **** --- 420,423 ---- { /* Add new patch number below this line */ + /**/ + 23, /**/ -- hundred-and-one symptoms of being an internet addict: 126. You brag to all of your friends about your date Saturday night...but you don't tell them it was only in a chat room. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /