summaryrefslogtreecommitdiff
path: root/bitmap.c
diff options
context:
space:
mode:
authorThomas Günther <tom@toms-cafe.de>2010-04-19 02:11:59 +0200
committerThomas Günther <tom@toms-cafe.de>2010-04-19 02:25:45 +0200
commit92711d662d7ffec560f517eb1e4878d1fa1621a9 (patch)
treedeab760243a4c8356ddf10b17a8b64e46c85614a /bitmap.c
parentf9acab524924cc50a2b8da1a71f891bb87b89bfa (diff)
downloadvdr-plugin-text2skin-92711d662d7ffec560f517eb1e4878d1fa1621a9.tar.gz
vdr-plugin-text2skin-92711d662d7ffec560f517eb1e4878d1fa1621a9.tar.bz2
Fixed segmentation fault with 16bit images (closes #258 - thanks to domml@vdrportal)
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c2
1 files changed, 1 insertions, 1 deletions
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);