Loading ...
Sorry, an error occurred while loading the content.

Re: Bug with ~ in substitution?

Expand Messages
  • Bram Moolenaar
    ... I can reproduce this (only when compiled with boundary checks). When ~ is empty it might read past the NUL at the end of a line. I ll make a patch for
    Message 1 of 2 , Sep 30, 2002
    • 0 Attachment
      Gary Holloway wrote:

      > Try these commands in sequence:
      >
      > :%s/x//g
      > :%s/~//g
      >
      > I either get some garbage in my buffer, or get a "Vim: Caught deadly signal
      > SEGV" -- looks like an internal buffer may be getting overridden, or
      > unitialized buffer read.
      >
      > Of course the intent was to remove the '~' characters (which I know should be
      > done with :%s/\~//g), but I accidentally left off the backslash, and
      > encountered what appears to be a bug.

      I can reproduce this (only when compiled with boundary checks). When
      "~" is empty it might read past the NUL at the end of a line. I'll make
      a patch for it.

      --
      From "know your smileys":
      ...---... SOS

      /// Bram Moolenaar -- Bram@... -- 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 ///
    Your message has been successfully submitted and would be delivered to recipients shortly.