Browse Source

perm: fix deletePolicy

xuxin 1 year ago
parent
commit
51a8f95310
1 changed files with 1 additions and 1 deletions
  1. 1 1
      perm/builder.go

+ 1 - 1
perm/builder.go

@@ -128,7 +128,7 @@ func (b *Builder) deletePolicy(p *PolicyBuilder) {
 			if err != nil {
 				panic(err)
 			}
-			b.policies = append(b.policies[:i], b.policies[1+1:]...)
+			b.policies = append(b.policies[:i], b.policies[i+1:]...)
 			break
 		}
 	}