projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
altos/scheme: Avoid crashing with non-list in length
[fw/altos]
/
src
/
scheme
/
ao_scheme_cons.c
diff --git
a/src/scheme/ao_scheme_cons.c
b/src/scheme/ao_scheme_cons.c
index 03dad956d6561f59e31f4e79bc3004def0c3e2a9..21ee10cc668abb405ea52db60204053e5a6f01f1 100644
(file)
--- a/
src/scheme/ao_scheme_cons.c
+++ b/
src/scheme/ao_scheme_cons.c
@@
-195,7
+195,7
@@
ao_scheme_cons_length(struct ao_scheme_cons *cons)
int len = 0;
while (cons) {
len++;
- cons = ao_scheme_
poly_cons(cons->cdr
);
+ cons = ao_scheme_
cons_cdr(cons
);
}
return len;
}