ref: 04a4132728a2f5141703d160f4d91a31de231b54
parent: 7c5d06769f410308200363047b14039c5dbe387d
author: Ali Gholami Rudi <ali@rudi.ir>
date: Tue Apr 23 13:12:05 EDT 2013
ren: for traps in the same position, prefer the first
--- a/ren.c
+++ b/ren.c
@@ -633,7 +633,7 @@
int i;
for (i = 0; i < ntraps; i++)
if (treg[i] >= 0 && tpos[i] > pos)
- if (best < 0 || tpos[i] <= tpos[best])
+ if (best < 0 || tpos[i] < tpos[best])
best = i;
return best;
}