diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/subr.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 2d55e682d3a..c14a048fb52 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -516,7 +516,8 @@ as returned by the `event-start' and `event-end' functions." Please convert your programs to use `aref' with character-base index." (let ((byte 0) (char 0)) (while (< byte byte-index) - (setq byte (+ byte (char-bytes (aref string byte))))) + (setq byte (+ byte (char-bytes (aref string char))) + char (1+ char))) (aref string char))) ;; Some programs still use this as a function. |