Przeglądaj źródła

Bugfix in AL model addition

Yentl Van Tendeloo 8 lat temu
rodzic
commit
e0959ccd1a
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      bootstrap/modelling.alc

+ 3 - 3
bootstrap/modelling.alc

@@ -462,7 +462,7 @@ Void function add_AL_links(model : Element, list : Element, element : Element, t
 	link = read_edge_dst(link)
 	link_name = "__" + cast_id2s(link)
 
-	if (bool_not(set_in_node(model["model"], link))):
+	if (bool_not(set_in(model["model"], link_name))):
 		dict_add_fast(model["model"], link_name, link)
 		dict_add_fast(model["type_mapping"], link_name, "StringAttr")
 
@@ -487,7 +487,8 @@ String function add_AL(model : Element, element : Element):
 		elem = list_read(work_node, 0)
 		type = list_read(work_node, 1)
 
-		if (bool_not(set_in_node(model["model"], elem))):
+		elem_name = "__" + cast_id2s(elem)
+		if (bool_not(set_in(model["model"], elem_name))):
 			// Determine the type if we don't know it
 			if (type == ""):
 				if (is_physical_action(elem)):
@@ -496,7 +497,6 @@ String function add_AL(model : Element, element : Element):
 					type = "Element"
 
 			// Add the node itself
-			elem_name = "__" + cast_id2s(elem)
 			dict_add_fast(model["model"], elem_name, elem)
 			dict_add_fast(model["type_mapping"], elem_name, type)