Skip to content

Commit 9e0ca95

Browse files
committed
fix: TKDPointTree Int32 overflow with large TPoints
1 parent 7e5c08f commit 9e0ca95

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Source/simba.container_kdpointtree.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ function TKDPointTree.RawNearest(pt:TPoint; notEqual:Boolean=False): PNode;
235235
resNode:PNode;
236236
procedure __nearest(node:Integer; depth:UInt8=0);
237237
var
238-
test,dist,delta:Integer;
238+
dist: Int64;
239+
test,delta:Integer;
239240
this:PNode;
240241
begin
241242
this := @self.data[node];

0 commit comments

Comments
 (0)