3.1.1 bugfix out of bounds

This commit is contained in:
Ryan Oldenburg 2021-12-16 04:00:49 -06:00
parent 21d00222d4
commit 11ba8e7af0
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,4 @@
version = "3.1.0"
version = "3.1.1"
author = "Andre von Houck and Ryan Oldenburg"
description = "Full-featured 2d graphics library for Nim."
license = "MIT"

View file

@ -750,6 +750,10 @@ proc drawUber(
xStart = xStart.clamp(0, a.width)
xStop = xStop.clamp(0, a.width)
# Skip this row if there is nothing in-bounds to draw
if xStart == a.width or xStop == 0:
continue
if blendMode == bmMask:
if xStart > 0:
zeroMem(a.data[a.dataIndex(0, y)].addr, 4 * xStart)