--- code/renderer/tr_image.c~ 2005-09-07 18:50:07.000000000 +0200 +++ code/renderer/tr_image.c 2005-09-07 18:49:16.000000000 +0200 @@ -1437,11 +1437,26 @@ * if we asked for color quantization. * In this example, we need to make an output work buffer of the right size. */ - /* JSAMPLEs per row in output buffer */ - row_stride = cinfo.output_width * cinfo.output_components; + + /* + * Wtf? Even though I don't really know the JPEG format, this looks like + * loads of bollox to me: + + JSAMPLEs per row in output buffer + row_stride = cinfo.output_width * cinfo.output_components; out = ri.Malloc(cinfo.output_width*cinfo.output_height*cinfo.output_components); + + * This was the id original. Since when is the size per pixel for the q3 intern images + * dependant on the jpeg format? This would produce a crash on 8 bit encoded jpegs! + * + * - Thilo Schulz + */ + + row_stride = cinfo.output_width * 4; + out = ri.Malloc(row_stride*cinfo.output_height); + *pic = out; *width = cinfo.output_width; *height = cinfo.output_height;