From 5c26a13482b48e3220fe6ec5bb7bbe5515cc4df4 Mon Sep 17 00:00:00 2001 From: Dmitry Kutakov Date: Thu, 17 Jan 2019 11:08:44 +0300 Subject: [PATCH] fix Context.Next() - recheck len of handlers every iteration --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.go b/context.go index c94926e1..7df87e14 100644 --- a/context.go +++ b/context.go @@ -105,7 +105,7 @@ func (c *Context) Handler() HandlerFunc { // See example in GitHub. func (c *Context) Next() { c.index++ - for s := int8(len(c.handlers)); c.index < s; c.index++ { + for ; c.index < int8(len(c.handlers)); c.index++ { c.handlers[c.index](c) } }