Commit c68a5ed5 authored by woob's avatar woob Committed by Øyvind "pippin" Kolås

pixelize: remove reliance on implementation-defined behavior in align_offset()

parent 6d4afd97
...@@ -93,8 +93,9 @@ static gint ...@@ -93,8 +93,9 @@ static gint
align_offset (gint offset, align_offset (gint offset,
gint size) gint size)
{ {
offset = offset % size; gint align = abs(offset) % size;
return offset <= 0 ? (offset * -1) : (size - offset);
return offset <= 0 ? align : (size - align);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment