To: vim-dev@vim.org Subject: Patch 6.1.203 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.203 Problem: ":%s/~//" causes a crash after ":%s/x//". (Gary Holloway) Solution: Avoid reading past the end of a line when "~" is empty. Files: src/regexp.c *** ../vim61.202/src/regexp.c Sun Apr 28 22:20:43 2002 --- src/regexp.c Mon Sep 30 22:14:57 2002 *************** *** 3434,3440 **** #endif TO_LOWER(*opnd) != TO_LOWER(*reginput)))) return FALSE; ! if (opnd[1] == NUL #ifdef FEAT_MBYTE && !(enc_utf8 && ireg_ic) #endif --- 3436,3447 ---- #endif TO_LOWER(*opnd) != TO_LOWER(*reginput)))) return FALSE; ! if (*opnd == NUL) ! { ! /* match empty string always works; happens when "~" is ! * empty. */ ! } ! else if (opnd[1] == NUL #ifdef FEAT_MBYTE && !(enc_utf8 && ireg_ic) #endif *** ../vim61.202/src/version.c Mon Sep 30 21:30:08 2002 --- src/version.c Mon Sep 30 22:20:03 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 203, /**/ -- From "know your smileys": :-{} Too much lipstick /// 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 /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///