diff --git a/AceComm-3.0/ChatThrottleLib.lua b/AceComm-3.0/ChatThrottleLib.lua index d5e181d..89a586c 100644 --- a/AceComm-3.0/ChatThrottleLib.lua +++ b/AceComm-3.0/ChatThrottleLib.lua @@ -121,17 +121,10 @@ function Ring:Link(other) -- Move and append all contents of another ring to th self.pos = other.pos other.pos = nil elseif other.pos then - -- Link the other ring to the back of this one. - local a = self.pos - local b = self.pos.prev - local x = other.pos - local y = other.pos.prev - - a.prev = y -- My first points to their last... - y.next = a -- ...and their last to my first. - b.next = x -- My last points to their first... - x.prev = b -- ...and their first to my last. - + -- Our tail should point to their head, and their tail to our head. + self.pos.prev.next, other.pos.prev.next = other.pos, self.pos + -- Our head should point to their tail, and their head to our tail. + self.pos.prev, other.pos.prev = other.pos.prev, self.pos.prev other.pos = nil end end