소스 검색

perm: fix deletePolicy

xuxin 1 년 전
부모
커밋
51a8f95310
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
 		}
 	}