소스 검색

MaxUint32-sized array is too much for 32bit

DarthSim 5 년 전
부모
커밋
7f95569dcf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      vips.go

+ 1 - 1
vips.go

@@ -292,7 +292,7 @@ func (img *vipsImage) Save(imgtype imageType, quality int) ([]byte, context.Canc
 		return nil, cancel, vipsError()
 	}
 
-	b := (*[math.MaxUint32]byte)(ptr)[:int(imgsize):int(imgsize)]
+	b := (*[math.MaxInt32]byte)(ptr)[:int(imgsize):int(imgsize)]
 
 	return b, cancel, nil
 }