Prevent overriding default group
This commit is contained in:
parent
bafd3cea14
commit
01dab6aa30
@ -34,7 +34,7 @@ class Groups(val id: Int, private val grps: HashMap<Int, Group>) {
|
|||||||
|
|
||||||
fun genKey(): Int {
|
fun genKey(): Int {
|
||||||
val key = rnd.nextInt()
|
val key = rnd.nextInt()
|
||||||
if (grps.containsKey(key) || key in listOf(NO_GROUP, AUTO_GROUP)) return genKey()
|
if (grps.containsKey(key) || key in listOf(NO_GROUP, DEFAULT_GROUP, AUTO_GROUP)) return genKey()
|
||||||
return key
|
return key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user