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

Re: [patch] VIM 6.2e SEGV

Expand Messages
  • Bram Moolenaar
    ... I am very glad you tracked down this problem. So far I could not reproduce this crash, but after setting encoding to utf-8 I can. Another solution is
    Message 1 of 2 , May 21, 2003
    • 0 Attachment
      Nam SungHyun wrote:

      > If there already exists swap file, gvim killed by SEGV.
      >
      > Because I use UTF-8, mb_ptr2len_check is utfc_ptr2len_check.
      > And it returns 0 because '*p' is NUL. So, no further spliting occurs.
      > Now, ync[1] and ync[2] in 'dialog_add_buttons()' is illegal.

      I am very glad you tracked down this problem. So far I could not
      reproduce this crash, but after setting 'encoding' to "utf-8" I can.

      Another solution is to insert an "else":

      *** ../vim-6.2e/src/gui_gtk.c Mon May 5 20:15:18 2003
      --- src/gui_gtk.c Wed May 21 10:18:20 2003
      ***************
      *** 1901,1907 ****
      else if (*p == DLG_HOTKEY_CHAR)
      *p = '_';
      #ifdef FEAT_MBYTE
      ! if (has_mbyte)
      p += (*mb_ptr2len_check)(p) - 1;
      #endif
      }
      --- 1901,1907 ----
      else if (*p == DLG_HOTKEY_CHAR)
      *p = '_';
      #ifdef FEAT_MBYTE
      ! else if (has_mbyte)
      p += (*mb_ptr2len_check)(p) - 1;
      #endif
      }

      --
      BEDEVERE: Oooooh!
      LAUNCELOT: No "Aaaaarrrrrrggghhh ... " at the back of the throat.
      BEDEVERE: No! "Oooooh!" in surprise and alarm!
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// 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 ///
      \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.