From: Kenichi Handa Date: Wed, 4 Mar 1998 07:42:24 +0000 (+0000) Subject: (sref): Increase CHAR in the while loop. X-Git-Tag: emacs-20.3~2008 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8b52e892668a30330140f485071b7ffba14d13aa;p=emacs.git (sref): Increase CHAR in the while loop. --- 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.