diff src/minibuf.c @ 25836:f540e1508f05

(Fminibuffer_complete_word): Calculate string byte size correctly.
author Kenichi Handa <handa@m17n.org>
date Thu, 30 Sep 1999 04:19:45 +0000
parents 7796a636f039
children 2a7f35e0072b
line wrap: on
line diff
--- a/src/minibuf.c	Thu Sep 30 04:18:36 1999 +0000
+++ b/src/minibuf.c	Thu Sep 30 04:19:45 1999 +0000
@@ -1833,12 +1833,12 @@
      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)
 	  {