From df02ebf00dafa7c2165330ed1f7eaa0b04f4dd0b Mon Sep 17 00:00:00 2001 From: Andreas Mieke Date: Mon, 28 Sep 2015 21:48:11 +0200 Subject: [PATCH] HOTFIX: Crashing server on description == 230 chars --- gserver/webapp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gserver/webapp.go b/gserver/webapp.go index 42ec4b3..4a87b7a 100644 --- a/gserver/webapp.go +++ b/gserver/webapp.go @@ -148,7 +148,7 @@ func GetLEpisode(c *gin.Context) { database.Db.Model(&LP).Related(&AT) var DEP []gin.H for _, EP := range EPs { - if len(EP.Descr.String) >= 230 { + if len(EP.Descr.String) > 230 { ints := []rune(EP.Descr.String) EP.Descr.String = string(ints[:230]) + "…" } @@ -169,7 +169,7 @@ func GetLEpisode(c *gin.Context) { database.Db.Model(&LP).Related(&AT) var DEP []gin.H for _, EP := range EPs { - if len(EP.Descr.String) >= 230 { + if len(EP.Descr.String) > 230 { ints := []rune(EP.Descr.String) EP.Descr.String = string(ints[:230]) + "…" }