From 9871caf1e28e3a22bba1323fe6a976a7faedde44 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Tue, 15 Jul 2014 15:41:18 -0400 Subject: [PATCH] Copy positions to avaoid multiple references --- pos.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pos.lua b/pos.lua index 40f8360..8d3e6fe 100644 --- a/pos.lua +++ b/pos.lua @@ -123,6 +123,9 @@ function areas:getPos(playerName) if not (pos1 and pos2) then return nil end + -- Copy positions so that the area table doesn't contain multiple + -- references to the same position. + pos1, pos2 = vector.new(pos1), vector.new(pos2) return areas:sortPos(pos1, pos2) end