From 92711d662d7ffec560f517eb1e4878d1fa1621a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCnther?= Date: Mon, 19 Apr 2010 02:11:59 +0200 Subject: Fixed segmentation fault with 16bit images (closes #258 - thanks to domml@vdrportal) --- bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitmap.c') diff --git a/bitmap.c b/bitmap.c index 87252ea..2a9037c 100644 --- a/bitmap.c +++ b/bitmap.c @@ -181,7 +181,7 @@ bool cText2SkinBitmap::LoadNonXpm(const char *Filename, int height, int width, i return false; } */ - bmp = new cBitmap(w, h, (*it).depth()); + bmp = new cBitmap(w, h, std::min((*it).depth(), 8U)); //Dprintf("this image has %d colors\n", (*it).totalColors()); const PixelPacket *pix = (*it).getConstPixels(0, 0, w, h); -- cgit v1.2.3