summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-03-04 07:42:24 +0000
committerKenichi Handa <handa@m17n.org>1998-03-04 07:42:24 +0000
commit8b52e892668a30330140f485071b7ffba14d13aa (patch)
tree94d67b6615f9c1d2c8a9f8d2a10c4ac7714b1f67 /lisp/subr.el
parent673c57d22a2d87b1d5fcca0065c82d8bcaf7cc1b (diff)
downloademacs-8b52e892668a30330140f485071b7ffba14d13aa.tar.gz
(sref): Increase CHAR in the while loop.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el3
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.