From e9995e7e632076efe97545f07707fcd34d0978cf Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 9 Jan 2012 13:10:55 -0600 Subject: [PATCH] make the BMP load crash have a better explanation message. --- src/RageSurface_Load_BMP.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RageSurface_Load_BMP.cpp b/src/RageSurface_Load_BMP.cpp index 64fc660740..3f4924fb03 100644 --- a/src/RageSurface_Load_BMP.cpp +++ b/src/RageSurface_Load_BMP.cpp @@ -41,7 +41,6 @@ static RageSurfaceUtils::OpenResult LoadBMP( RageFile &f, RageSurface *&img, RSt uint32_t iDataOffset = read_u32_le( f, sError ); uint32_t iHeaderSize = read_u32_le( f, sError ); - uint32_t iWidth, iHeight, iPlanes, iBPP, iCompression = COMP_BI_RGB, iColors = 0; if( iHeaderSize == 12 ) { @@ -100,6 +99,8 @@ static RageSurfaceUtils::OpenResult LoadBMP( RageFile &f, RageSurface *&img, RSt Gmask = Swap32LE( 0x0000FF00 ); Bmask = Swap32LE( 0x000000FF ); break; + default: + FAIL_M( ssprintf("%iBPP color depth not handled by BMP loader!", iBPP) ); } if( iCompression == COMP_BI_BITFIELDS )