From 22d9315fc681b3ba04ec460bcf1cb4ec39da69e5 Mon Sep 17 00:00:00 2001 From: potassium Date: Sun, 26 Jan 2025 05:38:11 +0300 Subject: [PATCH] works as intended --- fb/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fb/main.go b/fb/main.go index 613aa8f..3838192 100644 --- a/fb/main.go +++ b/fb/main.go @@ -43,12 +43,13 @@ func Draw(img image.Image) error { for w := 0; w < Width; w++ { _, err := buf.Write(Bytes(img.At(w, h))) if err != nil { - panic(err) + return err } } } err := buf.Flush() if err != nil { - panic(err) + return err } + return nil }