소스 검색

Proper delete

obscuren 11 년 전
부모
커밋
b55e017e62
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ethutil/bytes.go

+ 1 - 1
ethutil/bytes.go

@@ -18,7 +18,7 @@ func (self Bytes) String() string {
 func DeleteFromByteSlice(s [][]byte, hash []byte) [][]byte {
 	for i, h := range s {
 		if bytes.Compare(h, hash) == 0 {
-			return append(s[:i], s[i+1:]...)
+			return append(s[:i:i], s[i+1:]...)
 		}
 	}