From 6f1195ddedebbf6bb99a06d61ae1d840f95ebfa9 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Sat, 14 Oct 2023 11:40:36 -0400 Subject: [PATCH] fixed element assertion scope on frame validations --- graphics/core.lua | 2 +- graphics/element.lua | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/graphics/core.lua b/graphics/core.lua index a4a45fa..d6518ba 100644 --- a/graphics/core.lua +++ b/graphics/core.lua @@ -7,7 +7,7 @@ local flasher = require("graphics.flasher") local core = {} -core.version = "2.0.1" +core.version = "2.0.2" core.flasher = flasher core.events = events diff --git a/graphics/element.lua b/graphics/element.lua index 41e4c57..dcdccc4 100644 --- a/graphics/element.lua +++ b/graphics/element.lua @@ -217,10 +217,10 @@ function element.new(args, child_offset_x, child_offset_y) end -- check frame - element.assert(f.x >= 1, "frame x not >= 1", 2) - element.assert(f.y >= 1, "frame y not >= 1", 2) - element.assert(f.w >= 1, "frame width not >= 1", 2) - element.assert(f.h >= 1, "frame height not >= 1", 2) + element.assert(f.x >= 1, "frame x not >= 1", 3) + element.assert(f.y >= 1, "frame y not >= 1", 3) + element.assert(f.w >= 1, "frame width not >= 1", 3) + element.assert(f.h >= 1, "frame height not >= 1", 3) -- create window protected.window = window.create(self.p_window, f.x, f.y, f.w, f.h, args.hidden ~= true)