mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 20:22:20 +08:00
enhance code imported by #3413
if it needs to check if the handler is nil, tie c.index shall always ++
This commit is contained in:
parent
ea53388e6e
commit
90815bffc4
@ -186,10 +186,9 @@ func (c *Context) FullPath() string {
|
|||||||
func (c *Context) Next() {
|
func (c *Context) Next() {
|
||||||
c.index++
|
c.index++
|
||||||
for c.index < int8(len(c.handlers)) {
|
for c.index < int8(len(c.handlers)) {
|
||||||
if c.handlers[c.index] == nil {
|
if c.handlers[c.index] != nil {
|
||||||
continue
|
c.handlers[c.index](c)
|
||||||
}
|
}
|
||||||
c.handlers[c.index](c)
|
|
||||||
c.index++
|
c.index++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user