about summary refs log tree commit diff stats
path: root/058generic_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-06 11:31:37 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-06 11:31:37 -0800
commit12f304a333ecee6326a8111e0d8e1c494ee92087 (patch)
tree5af25c6e5988ae686889f8f462de7d39cc8aad3f /058generic_container.cc
parent795f5244abc9b9f26ff621fd1997db427289d2ba (diff)
downloadmu-12f304a333ecee6326a8111e0d8e1c494ee92087.tar.gz
2378
Now we're starting to run up against the misbehavior introduced by
generics: Type tries to insert rows for type ingredients. That is a
no-no.
Diffstat (limited to '058generic_container.cc')
-rw-r--r--058generic_container.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/058generic_container.cc b/058generic_container.cc
index 6ba05d5e..843a89c3 100644
--- a/058generic_container.cc
+++ b/058generic_container.cc
@@ -52,7 +52,7 @@ void read_type_ingredients(string& name) {
   name = slurp_until(in, ':');
   if (Type_ordinal.find(name) == Type_ordinal.end() || get(Type_ordinal, name) == 0)
     put(Type_ordinal, name, Next_type_ordinal++);
-  type_info& info = get(Type, get(Type_ordinal, name));
+  type_info& info = get_or_insert(Type, get(Type_ordinal, name));
   long long int next_type_ordinal = START_TYPE_INGREDIENTS;
   while (!in.eof()) {
     string curr = slurp_until(in, ':');