mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Fix assertion failures when loading/writing JPEGs
(e.g. the linking book loading animation). Nobody ever noticed because the debug build was completely broken in MSVC7, and H-uru/Plasma does it completely differently.
This commit is contained in:
@ -288,7 +288,7 @@ plMipmap *plJPEG::IRead( hsStream *inStream )
|
|||||||
#else
|
#else
|
||||||
while( cinfo.output_scanline < cinfo.output_height )
|
while( cinfo.output_scanline < cinfo.output_height )
|
||||||
{
|
{
|
||||||
UInt8 *startp = newMipmap->GetAddr8( 0, cinfo.output_scanline );
|
UInt8 *startp = (UInt8*)newMipmap->GetAddr32( 0, cinfo.output_scanline );
|
||||||
(void) jpeg_read_scanlines( &cinfo, &startp, 1 );
|
(void) jpeg_read_scanlines( &cinfo, &startp, 1 );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -439,7 +439,7 @@ hsBool plJPEG::IWrite( plMipmap *source, hsStream *outStream )
|
|||||||
#else
|
#else
|
||||||
while( cinfo.next_scanline < cinfo.image_height )
|
while( cinfo.next_scanline < cinfo.image_height )
|
||||||
{
|
{
|
||||||
UInt8 *startp = source->GetAddr8( 0, cinfo.next_scanline );
|
UInt8 *startp = (UInt8*)source->GetAddr32( 0, cinfo.next_scanline );
|
||||||
(void) jpeg_write_scanlines( &cinfo, &startp, 1 );
|
(void) jpeg_write_scanlines( &cinfo, &startp, 1 );
|
||||||
}
|
}
|
||||||
jpeg_finish_compress( &cinfo );
|
jpeg_finish_compress( &cinfo );
|
||||||
|
Reference in New Issue
Block a user