浏览代码

Asset slice length in getUint32

Connor Peet 9 年之前
父节点
当前提交
7bd399d5ef
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      block.go

+ 1 - 0
block.go

@@ -132,6 +132,7 @@ func CompressBlock(src, dst []byte, soffset int) (int, error) {
 // inefficient but it is significantly faster on littleEndian machines,
 // which include x84, amd64, and some ARM processors.
 func getUint32(b []byte) uint32 {
+	_ = b[3]
 	if isLittleEndian {
 		return *(*uint32)(unsafe.Pointer(&b))
 	}