diff --git a/src/lib/ui/Canvas.hx b/src/lib/ui/Canvas.hx index ff0ebc8..34d3a27 100644 --- a/src/lib/ui/Canvas.hx +++ b/src/lib/ui/Canvas.hx @@ -67,7 +67,7 @@ class CanvasKeyValueIterator{ } public function hasNext():Bool{ - return index.y < canvas.length && index.x < canvas[index.y].length; + return index.y < canvas.length && index.x <= canvas[index.y].length; } public function next():{key:Vec2, value:Pixel}{