Update to 13.0-RC2

This commit is contained in:
dP
2023-02-03 15:05:53 +04:00
parent 59c991fa52
commit ebf0794b1c
157 changed files with 4980 additions and 3101 deletions

View File

@@ -367,7 +367,12 @@ bool BmpReadHeader(BmpBuffer *buffer, BmpInfo *info, BmpData *data)
info->palette_size = ReadDword(buffer); // number of colours in palette
SkipBytes(buffer, header_size - 16); // skip the end of info header
}
if (info->palette_size == 0) info->palette_size = 1 << info->bpp;
uint maximum_palette_size = 1U << info->bpp;
if (info->palette_size == 0) info->palette_size = maximum_palette_size;
/* More palette colours than palette indices is not supported. */
if (info->palette_size > maximum_palette_size) return false;
data->palette = CallocT<Colour>(info->palette_size);