Fix a 16-bit overflow for large objects
This commit is contained in:
@@ -135,7 +135,7 @@ func LoadObject(filename string) (*Object, error) {
|
||||
}
|
||||
|
||||
buf := io.LimitReader(f, int64(sprite.PixelSize))
|
||||
sprite.Data = make([]byte, sprite.Height*sprite.Width)
|
||||
sprite.Data = make([]byte, int(sprite.Height)*int(sprite.Width))
|
||||
|
||||
// The pixel data is RLE-compressed. Uncompress it here.
|
||||
if err := rle.Expand(buf, sprite.Data); err != nil {
|
||||
|
Reference in New Issue
Block a user