瀏覽代碼

Fixed group_list by changing infinite recursion

Yentl Van Tendeloo 8 年之前
父節點
當前提交
a20ab04eb3
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      core/core_algorithm.alc

+ 2 - 1
core/core_algorithm.alc

@@ -914,6 +914,7 @@ Void function user_function_skip_init(user_id : String):
 						permission = cast_s2i(string_get(permissions, i))
 						if (bool_or(permission < 0, permission > 2)):
 							fail = True
+						i = i + 1
 
 					if (bool_not(fail)):
 						unset_attribute(core, model_id, "permissions")
@@ -1131,7 +1132,7 @@ Void function user_function_skip_init(user_id : String):
 			String admin
 			
 			groups = allAssociationDestinations(core, user_id, "belongsTo")
-			while (True):
+			while (read_nr_out(groups) > 0):
 				group_id = set_pop(groups)
 				if (set_in(allOutgoingAssociationInstances(core, group_id, "owner"), user_id)):
 					admin = " A "