diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-06-29 09:49:35 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-06-29 09:49:35 -0700 |
commit | d9630e06d8b520614bc263b7f0256a3baf7a6ef9 (patch) | |
tree | bb076e36b85508b32f3715b558a3a9febed386ed | |
parent | 558bf3d388ee75cc3f37ba27b097af2f73e20b52 (diff) | |
download | mu-d9630e06d8b520614bc263b7f0256a3baf7a6ef9.tar.gz |
3074
Thanks Ella Couch for finding this bug.
-rw-r--r-- | 027call_ingredient.cc | 3 | ||||
-rw-r--r-- | 038new_text.cc | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/027call_ingredient.cc b/027call_ingredient.cc index fe9db13c..b9195658 100644 --- a/027call_ingredient.cc +++ b/027call_ingredient.cc @@ -172,7 +172,8 @@ case INGREDIENT: { //: a particularly common array type is the string, or address:array:character :(code) -bool is_mu_string(const reagent& x) { +bool is_mu_string(reagent/*copy*/ x) { + // Begin is_mu_string(x) return x.type && x.type->value == get(Type_ordinal, "address") && x.type->right diff --git a/038new_text.cc b/038new_text.cc index 90a2fd67..33508395 100644 --- a/038new_text.cc +++ b/038new_text.cc @@ -86,6 +86,17 @@ def main [ ] +app: abc foo +:(scenario stash_string_as_array) +def main [ + 1:address:array:character <- new [abc] + stash *1:address:array:character +] ++app: 3 97 98 99 + +//: fixes way more than just stash +:(after "Begin is_mu_string(x)") +if (!canonize_type(x)) return false; + //: Allocate more to routine when initializing a literal string :(scenario new_string_overflow) % Initial_memory_per_routine = 2; |