mirror of
https://github.com/blendogames/thirtyflightsofloving.git
synced 2025-02-21 11:10:58 +00:00
Added filename to "Invalid JPEG color components" error message in JPG loader.
Added pointer checks to CL_TextColor().
This commit is contained in:
parent
e9a777fdf7
commit
562b6c816c
2 changed files with 4 additions and 1 deletions
|
@ -32,6 +32,9 @@ This sets the actual text color, can be called from anywhere
|
|||
*/
|
||||
void CL_TextColor (int colornum, int *red, int *green, int *blue)
|
||||
{
|
||||
if (!red || !green || !blue) // paranoia
|
||||
return;
|
||||
|
||||
switch (colornum)
|
||||
{
|
||||
case 1: // red
|
||||
|
|
|
@ -1307,7 +1307,7 @@ void R_LoadJPG (char *filename, byte **pic, int *width, int *height)
|
|||
// Check Color Components
|
||||
if (cinfo.output_components != 3)
|
||||
{
|
||||
VID_Printf(PRINT_ALL, "Invalid JPEG color components\n");
|
||||
VID_Printf(PRINT_ALL, "Invalid JPEG color components in %s\n", filename);
|
||||
jpeg_destroy_decompress(&cinfo);
|
||||
FS_FreeFile(rawdata);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue