Fix to BMP loader.

This commit is contained in:
Robert Osfield
2002-02-09 10:50:09 +00:00
parent ed45cccc25
commit 16ada0fa3b
2 changed files with 5 additions and 5 deletions

View File

@@ -188,7 +188,7 @@ int *numComponents_ret)
inf.Colorbits=cbits;
inf.ColorUsed=pow(2.0,inf.Colorbits); // infer the colours
}
long size = hd.siz[1]*65536+hd.siz[0];
long size = (unsigned short)hd.siz[1]*65536+(unsigned short)hd.siz[0];
int ncpal=4; // default number of colours per palette entry
size -= sizeof(bmpheader)+infsize;
if (inf.ImageSize<size) inf.ImageSize=size;