A proper fix for the setjmp bug converning non-jpeg's being passed to

the jpeg library, for the "Bad 
number of componants in jpeg" console print.


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2804 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2007-12-03 15:11:13 +00:00
parent 1224b3ea42
commit c413839e56
1 changed files with 10 additions and 1 deletions

View File

@ -952,9 +952,18 @@ badjpeg:
(void) jpeg_start_decompress(&cinfo);
if (cinfo.output_components == 0)
{
#ifdef _DEBUG
Con_Printf("No JPEG Components, not a JPEG.\n");
#endif
goto badjpeg;
}
if (cinfo.output_components!=3)
{
Con_Printf("Bad number of components in jpeg\n");
#ifdef _DEBUG
Con_Printf("Bad number of components in JPEG: '%d', should be '3'.\n",cinfo.output_components);
#endif
goto badjpeg;
}
size_stride = cinfo.output_width * cinfo.output_components;