diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-08-13 16:32:36 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-08-13 16:32:36 -0700 |
commit | 1ad3fe9e6134353362c9a1318b4ba52d3ecc0d75 (patch) | |
tree | df349dea704fca028c8c29c87d6f34f59b706671 /031address.cc | |
parent | dae2fa9688ce7b61ee2a46c0b616543ddbecd889 (diff) | |
download | mu-1ad3fe9e6134353362c9a1318b4ba52d3ecc0d75.tar.gz |
1988 - handle reagents without types
This can happen if 'canonize' fails. Make sure it doesn't kill mu. Thanks Caleb Couch.
Diffstat (limited to '031address.cc')
-rw-r--r-- | 031address.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/031address.cc b/031address.cc index 94c23210..f0657b98 100644 --- a/031address.cc +++ b/031address.cc @@ -57,7 +57,7 @@ reagent lookup_memory(reagent x) { //? cout << "lookup_memory: " << x.to_string() << "\n"; //? 2 static const type_ordinal ADDRESS = Type_ordinal["address"]; reagent result; - if (x.types.at(0) != ADDRESS) { + if (x.types.empty() || x.types.at(0) != ADDRESS) { raise << current_recipe_name() << ": tried to /lookup " << x.original_string << " but it isn't an address\n" << end(); return result; } |