diff options
| author | Kenichi Handa | 1999-09-30 04:19:45 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1999-09-30 04:19:45 +0000 |
| commit | 54643b2c497ffcf38b2600f4a4e15cf5fcf4e5e1 (patch) | |
| tree | 92ac2c6d6a64b1188075e7a9b2a85e98dcb1d731 /src | |
| parent | 54e67cf7406f72c590c31714ccadf012e0203974 (diff) | |
| download | emacs-54643b2c497ffcf38b2600f4a4e15cf5fcf4e5e1.tar.gz emacs-54643b2c497ffcf38b2600f4a4e15cf5fcf4e5e1.zip | |
(Fminibuffer_complete_word): Calculate string byte
size correctly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
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.") | |||
| 1833 | i gets index in string of where to stop completing. */ | 1833 | i gets index in string of where to stop completing. */ |
| 1834 | { | 1834 | { |
| 1835 | int len, c; | 1835 | int len, c; |
| 1836 | 1836 | int bytes = STRING_BYTES (XSTRING (completion)); | |
| 1837 | completion_string = XSTRING (completion)->data; | 1837 | completion_string = XSTRING (completion)->data; |
| 1838 | for (; i_byte < STRING_BYTES (XSTRING (completion)); i_byte += len, i++) | 1838 | for (; i_byte < STRING_BYTES (XSTRING (completion)); i_byte += len, i++) |
| 1839 | { | 1839 | { |
| 1840 | c = STRING_CHAR_AND_LENGTH (completion_string + i_byte, | 1840 | c = STRING_CHAR_AND_LENGTH (completion_string + i_byte, |
| 1841 | XSTRING (completion)->size - i_byte, | 1841 | bytes - i_byte, |
| 1842 | len); | 1842 | len); |
| 1843 | if (SYNTAX (c) != Sword) | 1843 | if (SYNTAX (c) != Sword) |
| 1844 | { | 1844 | { |