Commit 4fde8940 authored by Tobias C. Rittweiler's avatar Tobias C. Rittweiler
Browse files

Fix off-by-one in Allegro's readtable-iterator implementation.

parent dccb80df
...@@ -167,10 +167,11 @@ ...@@ -167,10 +167,11 @@
(labels ((grovel-macro-chars () (labels ((grovel-macro-chars ()
(if (>= idx table-length) (if (>= idx table-length)
(grovel-dispatch-chars) (grovel-dispatch-chars)
(let ((attr (svref attribute-table idx))) (let ((attr (svref attribute-table idx))
(oidx idx))
(incf idx) (incf idx)
(if (= attr +macro-attr+) (if (= attr +macro-attr+)
(values t (code-char (1- idx)) (svref macro-table idx) nil nil) (values t (code-char oidx) (svref macro-table oidx) nil nil)
(grovel-macro-chars))))) (grovel-macro-chars)))))
(grovel-dispatch-chars () (grovel-dispatch-chars ()
(if (null dispatch-tables) (if (null dispatch-tables)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment