From: Kenichi Handa Date: Thu, 30 Sep 1999 04:19:45 +0000 (+0000) Subject: (Fminibuffer_complete_word): Calculate string byte X-Git-Tag: emacs-pretest-21.0.90~6606 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=54643b2c497ffcf38b2600f4a4e15cf5fcf4e5e1;p=emacs.git (Fminibuffer_complete_word): Calculate string byte size correctly. --- diff --git a/src/minibuf.c b/src/minibuf.c index ee3fbef5c91..033c598e0a1 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1833,12 +1833,12 @@ Return nil if there is no valid completion, else t.") i gets index in string of where to stop completing. */ { int len, c; - + int bytes = STRING_BYTES (XSTRING (completion)); completion_string = XSTRING (completion)->data; for (; i_byte < STRING_BYTES (XSTRING (completion)); i_byte += len, i++) { c = STRING_CHAR_AND_LENGTH (completion_string + i_byte, - XSTRING (completion)->size - i_byte, + bytes - i_byte, len); if (SYNTAX (c) != Sword) {