Actually limit sequence length.

Fix #1038
This commit is contained in:
Mihai Bazon
2016-04-12 14:15:14 +03:00
parent 3907a5e3b2
commit b5a7a231f7
2 changed files with 25 additions and 2 deletions

View File

@@ -633,6 +633,13 @@ var AST_Seq = DEFNODE("Seq", "car cdr", {
p = p.cdr;
}
},
len: function() {
if (this.cdr instanceof AST_Seq) {
return this.cdr.len() + 1;
} else {
return 2;
}
},
_walk: function(visitor) {
return visitor._visit(this, function(){
this.car._walk(visitor);