Merge branch 'main' into beta

This commit is contained in:
David Capello 2022-01-10 17:03:04 -03:00
commit efd8a71b9f
2 changed files with 12 additions and 2 deletions

2
laf

@ -1 +1 @@
Subproject commit 56b72b6b03f8411115c4bd201b6896340eee08e1
Subproject commit a6e51dcc134e42e27ce96b0b634de28599ab49b3

View File

@ -1,5 +1,5 @@
// Aseprite Document IO Library
// Copyright (c) 2018-2021 Igara Studio S.A.
// Copyright (c) 2018-2022 Igara Studio S.A.
// Copyright (c) 2001-2018 David Capello
//
// This file is released under the terms of the MIT license.
@ -616,6 +616,16 @@ void read_compressed_image_templ(FileInterface* f,
}
size_t bytes_read = f->readBytes(&compressed[0], input_bytes);
// Error reading "input_bytes" bytes, broken file? chunk without
// enough compressed data?
if (bytes_read == 0) {
delegate->error(
fmt::format("Error reading {} bytes of compressed data",
input_bytes));
break;
}
zstream.next_in = (Bytef*)&compressed[0];
zstream.avail_in = bytes_read;