diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 441c3d558..b0e174214 100755 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -471,8 +471,10 @@ func Str2html(raw string) template.HTML { func subOne(length int) int { return length - 1 } -func addOne(length int64) int64 { - return length + 1 +func addOne(i) int64 { + if i>=0 { + return i + 1 + } } // Escape escapes a HTML string func Escape(raw string) string { diff --git a/templates/custom/task_wait_count.tmpl b/templates/custom/task_wait_count.tmpl index 49c59641e..9dd95d2e5 100644 --- a/templates/custom/task_wait_count.tmpl +++ b/templates/custom/task_wait_count.tmpl @@ -1,25 +1,26 @@