From 89b87bc7c493670ecb598784e1073a09f691d43e Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 29 Jul 2015 18:40:36 -0700 Subject: 1886 - gracefully handle malformed ingredients For example: x:number <- index y:address:array:number, 3 (forgetting to do a lookup) Thanks Caleb Couch. --- 053continuation.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '053continuation.cc') diff --git a/053continuation.cc b/053continuation.cc index 20cf1b05..5885fd40 100644 --- a/053continuation.cc +++ b/053continuation.cc @@ -193,6 +193,7 @@ REPLY_DELIMITED_CONTINUATION, Recipe_ordinal["reply-delimited-continuation"] = REPLY_DELIMITED_CONTINUATION; :(before "End Primitive Recipe Implementations") case REPLY_DELIMITED_CONTINUATION: { + products.resize(1); // first clear any existing ingredients, to isolate the creation of the // continuation from its calls Current_routine->calls.front().ingredient_atoms.clear(); @@ -210,7 +211,6 @@ case REPLY_DELIMITED_CONTINUATION: { Current_routine->calls.pop_front(); } // return it as the result of the 'reset' call - products.resize(1); products.at(0).push_back(Next_delimited_continuation_id); ++Next_delimited_continuation_id; break; // continue to process rest of 'reset' call -- cgit 1.4.1-2-gfad0