Mercurial > dwindows
changeset 1835:0123e8aec5b4
Fix crash when loading 8bpp images on OS/2 with GBM...
We needed to allocate a 256 unit GBMRBG array not 1.
Colors don't display properly with my test image, but
it no longer crashes... must need to do something with
the palette.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 08 Nov 2012 19:34:24 +0000 |
parents | ca6ef85fffc5 |
children | 692c3a18a112 |
files | os2/dw.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Thu Nov 01 13:51:35 2012 +0000 +++ b/os2/dw.c Thu Nov 08 19:34:24 2012 +0000 @@ -7142,7 +7142,7 @@ /* if less than 24-bit, then have palette */ if(gbm.bpp < 24) { - gbmrgb = alloca(sizeof(GBMRGB)); + gbmrgb = alloca(sizeof(GBMRGB) * 256); /* Read the palette from the file */ if((err = _gbm_read_palette(fd, z, &gbm, gbmrgb)) != 0) {