From 1163a688bcceef83801dcaffe6041f86e41486c3 Mon Sep 17 00:00:00 2001 From: mjarkk Date: Mon, 6 May 2019 19:36:23 +0200 Subject: [PATCH] Added some extra error checks to solve the first error --- gui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui.go b/gui.go index 4ff91ec..119b533 100644 --- a/gui.go +++ b/gui.go @@ -572,7 +572,7 @@ func corner(v *View, directions byte) rune { // drawFrameCorners draws the corners of the view. func (g *Gui) drawFrameCorners(v *View, fgColor, bgColor Attribute) error { if v.y0 == v.y1 { - if !g.SupportOverlaps { + if !g.SupportOverlaps && v.x0 >= 0 && v.x1 >= 0 && v.y0 >= 0 && v.x0 < g.maxX && v.x1 < g.maxX && v.y0 < g.maxY { if err := g.SetRune(v.x0, v.y0, '╶', fgColor, bgColor); err != nil { return err }