summaryrefslogtreecommitdiff
path: root/source/r_images.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-08-05 20:52:42 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-08-05 20:52:42 +0000
commit51e1422cd7860e4112c5cf5c9fc384d60f9a079d (patch)
tree4d3154bb286fbf0f842eee47492a563d105f1406 /source/r_images.c
parent21507d2e956dd3baed08fc8808247c9dfec313d3 (diff)
Check guessed out_color_space instead jpeg_color_space when loading JPEG images.
Diffstat (limited to 'source/r_images.c')
-rw-r--r--source/r_images.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/r_images.c b/source/r_images.c
index 0988364..cd8bb21 100644
--- a/source/r_images.c
+++ b/source/r_images.c
@@ -697,7 +697,7 @@ qerror_t IMG_LoadJPG( const char *filename, byte **pic, int *width, int *height
my_mem_src( &cinfo, rawdata, rawlength );
jpeg_read_header( &cinfo, TRUE );
- if( cinfo.jpeg_color_space != JCS_RGB && cinfo.jpeg_color_space != JCS_GRAYSCALE ) {
+ if( cinfo.out_color_space != JCS_RGB && cinfo.out_color_space != JCS_GRAYSCALE ) {
Com_DPrintf( "%s: %s: invalid image color space\n", __func__, filename );
ret = Q_ERR_INVALID_FORMAT;
goto fail;