From 264801c9f8f5ff9ded7e7f82a008ce26e8ca1b38 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sat, 30 Jan 2021 20:45:39 -0600 Subject: [PATCH] >= 0 for image dimensions --- src/pixie/images.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pixie/images.nim b/src/pixie/images.nim index b952492..eee8d0c 100644 --- a/src/pixie/images.nim +++ b/src/pixie/images.nim @@ -16,8 +16,8 @@ when defined(release): proc newImage*(width, height: int): Image = ## Creates a new image with the parameter dimensions. - if width < 0 or height < 0: - raise newException(PixieError, "Image width and height must be positive") + if width <= 0 or height <= 0: + raise newException(PixieError, "Image width and height must be > 0") result = Image() result.width = width