summaryrefslogtreecommitdiff
path: root/src/mbgl/geometry/line_atlas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/geometry/line_atlas.cpp')
-rw-r--r--src/mbgl/geometry/line_atlas.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp
index 6ddf16af0b..2042195b6c 100644
--- a/src/mbgl/geometry/line_atlas.cpp
+++ b/src/mbgl/geometry/line_atlas.cpp
@@ -54,13 +54,17 @@ void addRoundDash(
if (ranges.empty()) return;
for (int y = -n; y <= n; y++) {
- int row = yOffset + n + y;
+ int row = static_cast<int32_t>(yOffset) + n + y;
const uint32_t index = image.size.width * row;
uint32_t currIndex = 0;
DashRange range = ranges[currIndex];
for (uint32_t x = 0; x < image.size.width; ++x) {
- if (x / range.right > 1.0f && ++currIndex < ranges.size()) {
+ if (range.right == 0) {
+ if (x != 0 && ++currIndex < ranges.size()) {
+ range = ranges[currIndex];
+ }
+ } else if (x / range.right > 1.0f && ++currIndex < ranges.size()) {
range = ranges[currIndex];
}