Skip to content

Commit

Permalink
Fix map wrapping (at last).
Browse files Browse the repository at this point in the history
  • Loading branch information
liberforce committed Nov 5, 2011
1 parent fea49b4 commit 6d65b96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ inline gint wrapped_vector (guint rc1,
guint n_rcs)
{
gint d1 = (gint)rc2 - (gint)rc1;
gint d2 = n_rcs - d1;
gint d2 = (rc1 > rc2) ? n_rcs + d1 : d1 - n_rcs;
return (abs (d1) < abs (d2)) ? d1 : d2;
}

0 comments on commit 6d65b96

Please sign in to comment.