Skip to content

Commit a82bad9

Browse files
authored
Merge pull request #478 from s3bk/patch-3
fix #428
2 parents 6ce65b2 + 9909e44 commit a82bad9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

renderer/src/tiler.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,16 @@ fn process_line_segment(line_segment: LineSegment2F,
287287
match next_step_direction {
288288
None => break,
289289
Some(StepDirection::X) => {
290+
if tile_coords.x() == to_tile_coords.x() {
291+
break;
292+
}
290293
t_max += vec2f(t_delta.x(), 0.0);
291294
tile_coords += vec2i(step.x(), 0);
292295
}
293296
Some(StepDirection::Y) => {
297+
if tile_coords.y() == to_tile_coords.y() {
298+
break;
299+
}
294300
t_max += vec2f(0.0, t_delta.y());
295301
tile_coords += vec2i(0, step.y());
296302
}

0 commit comments

Comments
 (0)