From 1fa86357ec79b239fc9a13f1806f432c971c5fa4 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 15 Jun 2023 04:30:39 +0000 Subject: [PATCH] arrays start at zero dumbass --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 0717319..413d8f5 100644 --- a/main.go +++ b/main.go @@ -153,7 +153,7 @@ func (a *Animation) Next() (image.Image, <-chan time.Time, error) { } if len(a.image) == 3 { if a.countDown > 0 { - a.ctx.DrawImageAnchored(a.image[3], 0, 0, 0, 0) + a.ctx.DrawImageAnchored(a.image[2], 0, 0, 0, 0) a.countDown -= 50 } else { a.image = a.image[:len(a.image)-1] @@ -171,7 +171,7 @@ func (a *Animation) Next() (image.Image, <-chan time.Time, error) { baseImage, _ := b64.StdEncoding.DecodeString(incoming.Image) bigImage, _, _ := image.Decode(bytes.NewReader(baseImage)) a.image = append(a.image, imaging.Resize(bigImage, 32, 32, imaging.Lanczos)) - a.ctx.DrawImageAnchored(a.image[3], 0, 0, 0, 0) + a.ctx.DrawImageAnchored(a.image[2], 0, 0, 0, 0) } default: }