Update of /cvsroot/plib/plib/src/ssg
In directory sc8-pr-cvs1:/tmp/cvs-serv27997
Modified Files:
ssgLoadSGI.cxx
Log Message:
Bugfix by Olivier A.
Index: ssgLoadSGI.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadSGI.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ssgLoadSGI.cxx 2 Sep 2002 06:05:48 -0000 1.15
+++ ssgLoadSGI.cxx 4 Nov 2003 13:14:33 -0000 1.16
@@ -191,12 +191,13 @@
{
unsigned char *tmpp = rle_temp ;
unsigned char *bufp = buf ;
+ int length = leng [ z * ysize + y ];
- fread ( rle_temp, 1, leng [ z * ysize + y ], image_fd ) ;
+ fread ( rle_temp, 1, length, image_fd ) ;
unsigned char pixel, count ;
- while ( TRUE )
+ while ( tmpp < rle_temp + length )
{
pixel = *tmpp++ ;
|