template bounds check fix
This commit is contained in:
parent
4239128398
commit
051f99498c
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -392,7 +392,7 @@ func (web *Web) watchCreatePost(c *gin.Context) {
|
|||
log.Fatalln("Could not load templates from embed FS")
|
||||
}
|
||||
|
||||
if templateID >= len(templateFiles) {
|
||||
if templateID > len(templateFiles) {
|
||||
log.Println("/watch/create POSTed with", templateID, "but only", len(templateFiles), "templates")
|
||||
c.AbortWithError(http.StatusBadRequest, err)
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue